From 2854b8673300617bd2883feae9fbff57365f0bad Mon Sep 17 00:00:00 2001 From: Tadas Baltrusaitis Date: Mon, 28 Nov 2016 17:27:32 -0500 Subject: [PATCH] Bug fix for gaze visualization. --- gui/OpenFaceDemo/MainWindow.xaml.cs | 2 +- lib/local/LandmarkDetector/src/LandmarkDetectorUtils.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gui/OpenFaceDemo/MainWindow.xaml.cs b/gui/OpenFaceDemo/MainWindow.xaml.cs index 6cbd2dc..f4a0e0f 100644 --- a/gui/OpenFaceDemo/MainWindow.xaml.cs +++ b/gui/OpenFaceDemo/MainWindow.xaml.cs @@ -248,7 +248,7 @@ namespace OpenFaceDemo cx = grayFrame.Width / 2f; cy = grayFrame.Height / 2f; } - + bool detectionSucceeding = ProcessFrame(clnf_model, clnf_params, frame, grayFrame, fx, fy, cx, cy); double confidence = (-clnf_model.GetConfidence()) / 2.0 + 0.5; diff --git a/lib/local/LandmarkDetector/src/LandmarkDetectorUtils.cpp b/lib/local/LandmarkDetector/src/LandmarkDetectorUtils.cpp index 163db3e..e21fa7d 100644 --- a/lib/local/LandmarkDetector/src/LandmarkDetectorUtils.cpp +++ b/lib/local/LandmarkDetector/src/LandmarkDetectorUtils.cpp @@ -1068,7 +1068,6 @@ vector CalculateLandmarks(CLNF& clnf_model) vector CalculateEyeLandmarks(CLNF& clnf_model) { - int idx = clnf_model.patch_experts.GetViewIdx(clnf_model.params_global, 0); vector to_return; // If the model has hierarchical updates draw those too for (size_t i = 0; i < clnf_model.hierarchical_models.size(); ++i) @@ -1077,7 +1076,7 @@ vector CalculateEyeLandmarks(CLNF& clnf_model) if (clnf_model.hierarchical_model_names[i].compare("left_eye_28") == 0 || clnf_model.hierarchical_model_names[i].compare("right_eye_28") == 0) { - auto lmks = CalculateLandmarks(clnf_model.hierarchical_models[i].detected_landmarks, clnf_model.hierarchical_models[i].patch_experts.visibilities[0][idx]); + auto lmks = CalculateLandmarks(clnf_model.hierarchical_models[i].detected_landmarks, clnf_model.hierarchical_models[i].patch_experts.visibilities[0][0]); for (auto lmk : lmks) { to_return.push_back(lmk);