public WebCamEye(int CameraID) { _form = new WebCamForm(new trkExposureCallback(setExposure)); _camera = CLEyeCreateCamera(CameraUUID(CameraID), CLEyeCameraColorMode.CLEYE_MONO_PROCESSED, CLEyeCameraResolution.CLEYE_VGA, 40); this.CameraID = CameraID; int w = 0, h = 0; if (_camera == IntPtr.Zero) { return; } CLEyeCameraGetFrameDimensions(_camera, ref w, ref h); CreateBitmap(w, h); // create thread exit event _exitEvent = new ManualResetEvent(false); // start capture here ThreadPool.QueueUserWorkItem(Capture); //AutoExposure = false; //AutoGain = false; //AutoWhiteBalance = false; _form.trkExposure.Value = Exposure; ExposureCalibrationComplete = false; }
public void Show() { if (_form != null) { _form = new WebCamForm(new trkExposureCallback(setExposure)); _form.trkExposure.Value = Exposure; } _form.TopMost = true; _form.Show(); }
public WebCamEye(int CameraID) { _form = new WebCamForm(new trkExposureCallback(setExposure)); _camera = CLEyeCreateCamera(CameraUUID(CameraID), CLEyeCameraColorMode.CLEYE_MONO_PROCESSED, CLEyeCameraResolution.CLEYE_VGA, 40); this.CameraID = CameraID; int w = 0, h = 0; if (_camera == IntPtr.Zero) return; CLEyeCameraGetFrameDimensions(_camera, ref w, ref h); CreateBitmap(w, h); // create thread exit event _exitEvent = new ManualResetEvent(false); // start capture here ThreadPool.QueueUserWorkItem(Capture); //AutoExposure = false; //AutoGain = false; //AutoWhiteBalance = false; _form.trkExposure.Value = Exposure; ExposureCalibrationComplete = false; }