Ejemplo n.º 1
0
        private void sobelToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Bitmap bmp = new Bitmap(zoomPicBox1.Image.Width, zoomPicBox1.Image.Height);

            if (zoomPicBox1.Image != null)
            {
                ImageProcessing.SobelPointers(ImageProcessing.Grayscale(zoomPicBox1.Image), bmp, zoomPicBox1.Image.Width, zoomPicBox1.Image.Height);
                FormVisualizer viewResult = new FormVisualizer(FormVisualizer.DisplayMode.Form1, "");
                viewResult.SetPicture(bmp);
                viewResult.Show();
            }
        }
Ejemplo n.º 2
0
 private void drawLatestImage(object sender, PaintEventArgs e)
 {
     try
     {
         if (_latestFrame != null)
         {
             // Draw the latest image from the active camera
             //DisplayFPS();
             if (checkBoxVisualization.Checked)
             {
                 ImageProcessing.SobelPointers(_latestFrame, _dest1, CaptureWidthLocal, CaptureHeightLocal);
                 //pictureBox1.Refresh();
                 //pictureBox3.Refresh();
             }
             e.Graphics.DrawImage(_latestFrame, 0, 0, pictureBoxDisplay.Width, pictureBoxDisplay.Height);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + " drawing Source");
     }
 }