Ejemplo n.º 1
0
        private void DslrCamera_LiveViewImageReady(object sender, LiveViewImageReadyEventArgs e)
        {
            cameraImageArray = _imageDataProcessor.ReadBitmap(e.Data);
            cameraImageArray = _imageDataProcessor.CutArray(cameraImageArray, StartX, StartY, NumX, NumY, CameraXSize, CameraYSize);
            ApiContainer.DslrCamera.LiveViewImageReady -= DslrCamera_LiveViewImageReady;

            _cameraState = CameraStates.cameraIdle;
            cameraImageReady = true;
        }
Ejemplo n.º 2
0
        private void PrepareCameraImageArray(string rawFileName)
        {
            if (CameraSettings.CameraMode == Enums.CameraMode.Color16)
            {
                cameraImageArray = _imageDataProcessor.ReadAndDebayerRaw(rawFileName);
            }
            else if (CameraSettings.CameraMode == Enums.CameraMode.ColorJpg)
            {
                cameraImageArray = _imageDataProcessor.ReadJpeg(rawFileName);
            }
            else if (CameraSettings.CameraMode == Enums.CameraMode.RGGB)
            {
                cameraImageArray = _imageDataProcessor.ReadRaw(rawFileName);
            }
            if (BinX > 1 || BinY > 1)
            {
                cameraImageArray = _imageDataProcessor.Binning(cameraImageArray, BinX, BinY, CameraSettings.BinningMode);
            }

            cameraImageArray = _imageDataProcessor.CutArray(cameraImageArray, StartX, StartY, NumX, NumY, CameraXSize, CameraYSize);
        }