Gaze visualization in offline GUI.

This commit is contained in:
Tadas Baltrusaitis 2016-11-25 11:00:21 -05:00
parent 9900e8b0de
commit eaab68b916

View file

@ -482,6 +482,8 @@ namespace OpenFaceOffline
bool detectionSucceeding = ProcessFrame(clnf_model, clnf_params, frame, grayFrame, fx, fy, cx, cy); bool detectionSucceeding = ProcessFrame(clnf_model, clnf_params, frame, grayFrame, fx, fy, cx, cy);
double scale = clnf_model.GetRigidParams()[0];
double confidence = (-clnf_model.GetConfidence()) / 2.0 + 0.5; double confidence = (-clnf_model.GetConfidence()) / 2.0 + 0.5;
if (confidence < 0) if (confidence < 0)
@ -507,8 +509,7 @@ namespace OpenFaceOffline
{ {
landmarks = clnf_model.CalculateLandmarks(); landmarks = clnf_model.CalculateLandmarks();
lines = clnf_model.CalculateBox((float)fx, (float)fy, (float)cx, (float)cy); lines = clnf_model.CalculateBox((float)fx, (float)fy, (float)cx, (float)cy);
//gaze_lines = face_analyser.CalculateGazeLines((float)fx, (float)fy, (float)cx, (float)cy); // TODO figure out what is happening here gaze_lines = face_analyser.CalculateGazeLines(scale, (float)fx, (float)fy, (float)cx, (float)cy);
gaze_lines = new List<Tuple<Point, Point>>();
} }
// Visualisation // Visualisation