private void button4_Click(object sender, EventArgs e)
        {
            textBox1.Text = String.Empty;

            double sigma = Convert.ToDouble(sigmaTextBox.Text.Replace(".", ","));
            int    k     = Convert.ToInt32(KtextBox.Text);
            int    min   = Convert.ToInt32(MinTextBox.Text);

            IColorSheme colorSheme = null;

            if (GreyScaleRadioButton.Checked)
            {
                colorSheme = new GrayScaleColorSheme();
            }
            if (RgbRadioButton.Checked)
            {
                colorSheme = new RGBColorSheme();
            }
            if (LabRadioButton.Checked)
            {
                colorSheme = new LabColorSheme();
            }

            Segmentation segmentObj = new Segmentation();

            segmented = segmentObj.DoSegmentation(m_workImage, sigma, k, min, colorSheme);
            OutputBitmapOnPictureBox(segmented);
            outoutSegmented = true;

            //вывод в текстбокс
            textBox1.Text += $"Сегментів: {segmentObj.m_componentLength}" + Environment.NewLine + Environment.NewLine;

            if (AssessmentCheckBox.Checked)
            {
                textBox1.Text += segmentObj.CalcAssessments();
            }
        }