Ejemplo n.º 1
0
        private void harrisToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Form1 f1 = NewForm1();
            Form1 f2 = NewForm1();

            IplImage dstImg1 = new IplImage("box.png", LoadMode.GrayScale);



            Bitmap bmp = BitmapConverter.ToBitmap(dstImg1);

            Hessian h    = new Hessian();
            Bitmap  bmp2 = new Bitmap(bmp.Width, bmp.Height, System.Drawing.Imaging.PixelFormat.Format8bppIndexed);

            bmp2.Palette = bmp.Palette;


            InputThreahold it = new InputThreahold();

            DialogResult dr = it.ShowDialog();

            if (dr == DialogResult.OK)
            {
                double th;

                if (double.TryParse(it.textBox1.Text, out th))
                {
                    h.Harris(bmp, bmp2);



                    f1.pictureBoxIpl1.Image = bmp;
                    f2.pictureBoxIpl1.Image = bmp2;
                }
            }
        }
Ejemplo n.º 2
0
        private void harrisToolStripMenuItem1_Click(object sender, EventArgs e)
        {

            Form1 f1 = NewForm1();
            Form1 f2 = NewForm1();

            IplImage dstImg1 = new IplImage("box.png", LoadMode.GrayScale);



            Bitmap bmp = BitmapConverter.ToBitmap(dstImg1);

            Hessian h = new Hessian();
            Bitmap bmp2 = new Bitmap(bmp.Width, bmp.Height, System.Drawing.Imaging.PixelFormat.Format8bppIndexed);

            bmp2.Palette = bmp.Palette;


            InputThreahold it = new InputThreahold();

            DialogResult dr = it.ShowDialog();

            if (dr == DialogResult.OK)
            {
                

                double th;

                if( double.TryParse(it.textBox1.Text,out th))
                {
                    h.Harris(bmp, bmp2);



                    f1.pictureBoxIpl1.Image = bmp;
                    f2.pictureBoxIpl1.Image = bmp2;

                }

            }


        }