예제 #1
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            currentImg = _imageProcessing(originalImg, Int32.Parse(txtThreshold.Text), 255, 8);

            BlindSpot_Util util = new BlindSpot_Util();
            util.projectImage(currentImg);
            //currentImg.Draw(util.DetectedRegtangle, new Gray(255), 10);
            //Bitmap m = (Bitmap)pictureBox1.Image;
            //Image<Rgb, byte> bolo =new Image<Rgb,byte>(m);

            //Image<Rgb, byte> bolo = originalImg.Convert<Rgb, byte>();
            //currentRGBImage.Draw(util.DetectedRegtangle, new Rgb(255, 0, 0), 5);
            //currentRGBImage.Draw(new CircleF(new PointF(util.X_hc, util.Y_vc), 1), new Rgb(255, 0, 0), 5);
            //pictureBox1.Image = currentRGBImage.Resize(pictureBox1.Width, pictureBox1.Height, Emgu.CV.CvEnum.INTER.CV_INTER_LINEAR).ToBitmap(); ;
            //lbRect.Text = util.DetectedRegtangle.ToString();
            setPictureBoxImage(pictureBox1, currentImg);
        }
예제 #2
0
        private void button3_Click_1(object sender, EventArgs e)
        {
            util = new BlindSpot_Util();

            int rows, cols, anchorX, anchorY, shape;
            rows = Int32.Parse(txtRows.Text);
            cols = Int32.Parse(txtCols.Text);
            anchorY = Int32.Parse(txtY.Text);
            anchorX = Int32.Parse(txtX.Text);
            shape = cmbShape.SelectedIndex;
            this.closingIteration = Int32.Parse(txtIter.Text);
            //MessageBox.Show(shape + "");

            //Test morphological parameters
            currentImg = _testMorphological(originalImg, Int32.Parse(txtThreshold.Text), maxGrayValue, this.closingIteration, cols, rows, anchorX, anchorY, shape);

            //Test sobel Parameter then save to images
            //util._testSobelParameters(originalImg, Int32.Parse(txtThreshold.Text), maxGrayValue, this.closingIteration, cols, rows, anchorX, anchorY, shape);

            //util.projectImage(currentImg);
            pictureBox1.Image = currentImg.Bitmap;

            /*
            //Histogram(util.X_axis, pictureBox2, Color.Red, 0);
            //Histogram(util.Y_axis, pictureBox3, Color.Green, 1);
            */

            //util.testParameters(currentImg);
        }