From eaab68b91613fbb22c3f83cdbde693b3bd7a3831 Mon Sep 17 00:00:00 2001 From: Tadas Baltrusaitis Date: Fri, 25 Nov 2016 11:00:21 -0500 Subject: [PATCH] Gaze visualization in offline GUI. --- gui/OpenFaceOffline/MainWindow.xaml.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gui/OpenFaceOffline/MainWindow.xaml.cs b/gui/OpenFaceOffline/MainWindow.xaml.cs index e3f8e4f..0fdebb6 100644 --- a/gui/OpenFaceOffline/MainWindow.xaml.cs +++ b/gui/OpenFaceOffline/MainWindow.xaml.cs @@ -482,6 +482,8 @@ namespace OpenFaceOffline 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; if (confidence < 0) @@ -507,8 +509,7 @@ namespace OpenFaceOffline { landmarks = clnf_model.CalculateLandmarks(); 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 = new List>(); + gaze_lines = face_analyser.CalculateGazeLines(scale, (float)fx, (float)fy, (float)cx, (float)cy); } // Visualisation