示例#1
0
 public PictureForm(Image <Bgr, Byte> img)
 {
     InitializeComponent();
     image   = img;
     capture = new VideoCapture();
     if (capture == null)
     {
         return;
     }
     else
     {
         rh = new RecognitionHandler(imageBox1, capture);
         rh.ProcessFrameForPicture();
     }
 }
示例#2
0
 private void Form3_Load(object sender, EventArgs e)
 {
     if (capture == null)
     {
         try
         {
             capture = new VideoCapture();
         }
         catch (NullReferenceException exc)
         {
             MessageBox.Show(exc.Message);
         }
     }
     if (capture != null)
     {
         rh = new RecognitionHandler(imgCamUser, capture);
         Application.Idle -= rh.ProcessFrameForWebcam;
         Application.Idle += rh.ProcessFrameForWebcam;
     }
 }