예제 #1
0
        private void btnTrack_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
                _kMeans = new KMeans((Bitmap)picPreview.Image, Convert.ToInt32(txtNumClusters.Text), ImageProcessor.Colour.Types.RGB);
            else
                _kMeans = new KMeans((Bitmap)picPreview.Image, Convert.ToInt32(txtNumClusters.Text), ImageProcessor.Colour.Types.HSV);

            timer1.Enabled = true;
            timer1.Start();
        }
예제 #2
0
파일: Form1.cs 프로젝트: birrgrrim/bachelor
 private void button1_Click(object sender, EventArgs e)
 {
     _kMeans = new KMeans(source_bmp, 4, ImageProcessor.Colour.Types.RGB);
     while (!_kMeans.Converged)
     {
         _kMeans.Iterate();
     }
     seg_bmp = _kMeans.ProcessedImage;
     picturebox2_bmp = new Bitmap(seg_bmp,
             ImageUtils.GenerateImageDimensions(seg_bmp.Width, seg_bmp.Height, pictureBox2.Width, pictureBox2.Height));
     pictureBox2.Image = picturebox2_bmp;
 }