Exemplo n.º 1
0
        //****************************************************************
        //****************************************************************
        public FrameProcessor(string Frame1, string Frame2)
        {
            // give the path of Illuminated and AmbientFrame image
            _frame1 = Frame1;
            _frame2 = Frame2;

            _captureSessionParameter = new CaptureSessionParameter();
            _previewParameter        = new PreviewParameter();
            //Initialize IR Image Queue
            _iRImageQueue = new Queue <ImageFrame>();

            _ImageAutoEvent = new AutoResetEvent(false);
            StartIRDeviceManagedThread();

            _sensorSourceManager = new FSSensorSourceManager(_iRImageQueue, _ImageAutoEvent, _displayAutoEvent);

            _frameProcessThread = new ThreadsManager();
            _frameProcessThread.ThreadStart(FrameProcessThread);
            _selectedIRindex = 0;
        }
Exemplo n.º 2
0
 private void DequeueCapturePhoto(ref CaptureSessionParameter captureSessionParameter)
 {
     WaitCaptureMutex();
     captureSessionParameter.CaptureCount--;
     ReleaseCaptureMutex();
 }
Exemplo n.º 3
0
        private void CaptureFromImageFrame(ImageFrame[] imageFrameArray, SoftwareBitmap cleanSoftwareBitmap, ref CaptureSessionParameter captureSessionParameter /*, PreviewParameter previewParameter*/)
        {
            if (captureSessionParameter.CaptureCount > 0)
            {
                if (cleanSoftwareBitmap == null)
                {
                    cleanSoftwareBitmap = CleanSoftwareBitmap(imageFrameArray);
                }

                CaptureBitmap(imageFrameArray[0].OriginalBitmap /*, captureSessionParameter*/, imageFrameArray[0].FrameIllumination.ToString());
                CaptureBitmap(imageFrameArray[1].OriginalBitmap /*, captureSessionParameter*/, imageFrameArray[1].FrameIllumination.ToString());

                DequeueCapturePhoto(ref captureSessionParameter);
            }
        }
Exemplo n.º 4
0
        private void ProcessImageFrame(ImageFrame[] imageFrameArray, ref PreviewParameter previewParameter, ref CaptureSessionParameter captureSessionParameter)
        {
            SoftwareBitmap cleanSoftwareBitmap = null;

            if (imageFrameArray == null)
            {
                return;
            }

            if (previewParameter.Frametype == FrameType.Substracted)
            {
                cleanSoftwareBitmap = CleanSoftwareBitmap(imageFrameArray);
            }

            CaptureFromImageFrame(imageFrameArray, cleanSoftwareBitmap, ref captureSessionParameter /*, previewParameter*/);

            if (cleanSoftwareBitmap != null)
            {
                cleanSoftwareBitmap.Dispose();
            }
        }