Esempio n. 1
0
        public LandmarkData DetectLandmarks(FrameData frame)
        {
            if (Paused)
            {
                return(new LandmarkData(frame, FaceModel, false));
            }

            var detectionSuccessful = frame.GrayFrame != null?FaceModel.DetectLandmarksInVideo(frame.Frame, ModelParams, frame.GrayFrame) :
                                          FaceModel.DetectLandmarksInVideo(frame.Frame, ModelParams);

            if (DetectionSettings.CalculateGazeLines)
            {
                GazeAnalyzer.AddNextFrame(FaceModel, detectionSuccessful, frame.Fx, frame.Fy, frame.Cx, frame.Cy);
            }

            return(new LandmarkData(frame, FaceModel, detectionSuccessful));
        }