From ecaf8b6403f57e5813190f4ae1b89780c45339d8 Mon Sep 17 00:00:00 2001 From: Stéphane Lenclud Date: Sun, 3 Feb 2019 13:45:03 +0100 Subject: Kinect: Fixing tracking validity check. --- tracker-kinect-face/kinect_face_tracker.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tracker-kinect-face/kinect_face_tracker.cpp b/tracker-kinect-face/kinect_face_tracker.cpp index b7ccfecf..51990693 100644 --- a/tracker-kinect-face/kinect_face_tracker.cpp +++ b/tracker-kinect-face/kinect_face_tracker.cpp @@ -167,7 +167,9 @@ bool KinectFaceTracker::center() return true; } - +// +// +// void KinectFaceTracker::data(double *data) { const double dt = t.elapsed_seconds(); @@ -178,7 +180,7 @@ void KinectFaceTracker::data(double *data) ExtractFaceRotationInDegrees(&iFaceRotationQuaternion, &iFaceRotation.X, &iFaceRotation.Y, &iFaceRotation.Z); //Check if data is valid - if (!IsNullPoint(iFacePosition) && !IsNullPoint(iFaceRotation)) + if (IsValidRect(iFaceBox)) { // We have valid tracking retain position and rotation iLastFacePosition = iFacePosition; -- cgit v1.2.3