Ejemplo n.º 1
0
        public static async Task <FaceTrackerProcessor> CreateAsync(VideoFrameProcessor videoFrameProcessor)
        {
            FaceTracker tracker = await FaceTracker.CreateAsync();

            tracker.MinDetectableFaceSize = new BitmapSize()
            {
                Width = 32, Height = 32
            };
            tracker.MaxDetectableFaceSize = new BitmapSize()
            {
                Width = 1024, Height = 1024
            };

            return(new FaceTrackerProcessor(tracker, videoFrameProcessor));
        }
Ejemplo n.º 2
0
 private FaceTrackerProcessor(FaceTracker tracker, VideoFrameProcessor videoFrameProcessor)
 {
     latestFaces = new List <BitmapBounds>();
     faceTracker = tracker;
     this.videoFrameProcessor = videoFrameProcessor;
     if (this.videoFrameProcessor != null)
     {
         Task.Run(async() =>
         {
             isRunning = true;
             while (isRunning)
             {
                 ProcessFrame();
             }
         });
     }
 }