Beispiel #1
0
        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;
        }
Beispiel #2
0
 public void Show()
 {
     if (_form != null)
     {
         _form = new WebCamForm(new trkExposureCallback(setExposure));
         _form.trkExposure.Value = Exposure;
     }
     _form.TopMost = true;
     _form.Show();
 }
Beispiel #3
0
        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;
        }
Beispiel #4
0
 public void Show()
 {
     if (_form != null)
     {
         _form = new WebCamForm(new trkExposureCallback(setExposure));
         _form.trkExposure.Value = Exposure;
     }
     _form.TopMost = true;
     _form.Show();
 }