Ejemplo n.º 1
0
        //default constructor for testing
        public CCameraUSB(FUSBCam mightexCamera)
        {
            _imgControl._resolution   = RESOLUTION.VGA;
            _imgControl._rowSize      = 640;
            _imgControl._columnSize   = 480;
            _imgControl._bin          = 0;
            _imgControl._binMode      = 1;
            _imgControl._xStart       = 0;
            _imgControl._yStart       = 0;
            _imgControl._greenGain    = 12;
            _imgControl._blueGain     = 12;
            _imgControl._redGain      = 12;
            _imgControl._exposureTime = 5000; // 5ms.

            _imgControl._gamma    = 10;
            _imgControl._contrast = 50;
            _imgControl._bright   = 50;

            _imgControl._sharpLevel = 0;
            _imgControl._blkWhtMode = 0;
            _imgControl._horzMirror = 1;
            _imgControl._vertFlip   = 1;

            MightexCam     = mightexCamera;
            frameDelegate  = new FrameCallbackDelegate(GrabbingFrameCallback);
            DeviceDelegate = new DeviceCallbackDelegate(DeviceCallback);
            _maxX          = 1280; // Assume we're using 1.3M camera.
            _maxY          = 1024;

            AllocImageMem();
        }
Ejemplo n.º 2
0
        //public CCameraUSB( FUSBCam mightexCamera  )
        //default constructor for testing
        public CCameraUSB( FUSBCam mightexCamera, PictureBox picBox )
        {
            this.picBox = picBox;
            pos = (picBox.Width-1) * 3;
            bmps = new Bitmap[2];
            bmps[0] = new Bitmap(picBox.Width, picBox.Height, PixelFormat.Format24bppRgb);
            bmps[1] = new Bitmap(picBox.Width, picBox.Height, PixelFormat.Format24bppRgb);
            rect = new Rectangle(1, 0, picBox.Width - 1, picBox.Height);

             _imgControl._exposureTime = 5000; // 5ms.

            MightexCam = mightexCamera;
            frameDelegate = new FrameCallbackDelegate(GrabbingFrameCallback);
        }