Beispiel #1
0
        private void buttonSegmentation_Click(object sender, EventArgs e)
        {
            this.Size         = new Size(1343, 600);
            label.Visible     = true;
            trackBar1.Visible = true;
            label.Text        = trackBar1.Value.ToString();

            BinarySegmentator binarySegmentator = new BinarySegmentator();
            byte threshold = (byte)trackBar1.Value;

            Segment(imgBinarizeReal, imgReal, threshold, pictureSegmenReal, binarySegmentator);
            Segment(imgBinarizeTEMP, imgTEMP, threshold, pictureSegmenTEMP, binarySegmentator);
            Segment(imgBinarizeResultColor, imgResultColor, threshold, pictureSegmenResult1, binarySegmentator);
            Segment(imgBinarizeResultGray, imgResultGray, threshold, pictureSegmenResult2, binarySegmentator);

            SegmentationAssessment(imgBinarizeReal, labelRealM1White, labelRealM1Black, labelRealM2White, labelRealM2Black);
            SegmentationAssessment(imgBinarizeTEMP, labelTempM1White, labelTempM1Black, labelTempM2White, labelTempM2Black);
            SegmentationAssessment(imgBinarizeResultColor, labelResult1M1White, labelResult1M1Black, labelResult1M2White, labelResult1M2Black);
            SegmentationAssessment(imgBinarizeResultGray, labelResult2M1White, labelResult2M1Black, labelResult2M2White, labelResult2M2Black);
        }
Beispiel #2
0
 private void Segment(FastBitmap resultImg, FastBitmap inputImg, byte threshold, PictureBox pictureBox, BinarySegmentator binarySegmentator)
 {
     resultImg        = binarySegmentator.Segmentation(inputImg, threshold, 255);
     pictureBox.Image = resultImg.Bitmap;
 }