static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); FingerTracker fingerTracker = new FingerTracker(); CaptureForm captureForm = new CaptureForm(); fingerTracker.mCaptureForm = captureForm; Application.Run(captureForm); }
public FingerTracker() { CvInvoke.UseOpenCL = false; mCaptureForm = null; mFrame = new Mat(); try { mCapture = new VideoCapture(); mCapture.ImageGrabbed += ProcessFrame; mCapture.Start(); } catch (NullReferenceException exception) { MessageBox.Show(exception.Message); } }