/// <summary>
        /// Initializes a new instance of the KinectFacialRecognitionEngine class
        /// </summary>
        public KinectFacialRecognitionEngine(KinectSensor kinect, IFrameSource frameSource)
        {
            this.Kinect = kinect;
            this.ProcessingMutex = new object();
            this.ProcessingEnabled = true;
            this.Processor = new FacialRecognitionProcessor();
            this.frameSource = frameSource;
            this.frameSource.FrameDataUpdated += this.FrameSource_FrameDataUpdated;

            this.recognizerWorker = new BackgroundWorker();
            this.recognizerWorker.DoWork += this.RecognizerWorker_DoWork;
            this.recognizerWorker.RunWorkerCompleted += this.RecognizerWorker_RunWorkerCompleted;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Asynchronously encodes a specified range of frames obtained from the specified frame source.
 /// </summary>
 /// <param name="frameSource"></param>
 /// <param name="start"></param>
 /// <param name="count"></param>
 /// <param name="userState"></param>
 public void EncodeAsync(IFrameSource frameSource, long start, long count, object userState)
 {
 }
Exemplo n.º 3
0
        /// <summary>
        /// Encodes a specified range of frames obtained from the specified frame source.
        /// </summary>
        /// <param name="frameSource"></param>
        /// <param name="start"></param>
        /// <param name="count"></param>
        public void Encode(IFrameSource frameSource, long start, long count)
        {
            Contract.Requires(frameSource != null);

            var end = start + count;
            for (long i = start; i < end; ++i)
                this.EncodeFrame(frameSource.GetFrame(i));
        }
Exemplo n.º 4
0
 private void _frameSource_NewFrame(IFrameSource frameSource, Frame frame, double fps)
 {
     BitMaps.Add(frame.Image);
 }
Exemplo n.º 5
0
        public void OnImageCaptured(IFrameSource frameSource, Frame frame, double fps)
        {
            _latestFrame = frame.Image;
            histograms = BitmapConverting.getHistoGrams(_latestFrame, 8, 8);

            BitmapConverting.markRedSectors(_latestFrame, histograms, 8, 8);
            pictureBoxDisplay.Invalidate();
            
            frameIndex++;

            
        }
Exemplo n.º 6
0
 public void OnImageCaptured(IFrameSource frameSource,
     Frame frame, double fps)
 {          
     ImgVideo.Dispatcher.BeginInvoke(
         (Action) (() => ImgVideo.Source = ImageDataConverter.BitmapToBitmapSource(frame.Image)));
 }