diff options
author | Stéphane Lenclud <github@lenclud.com> | 2019-02-03 13:45:03 +0100 |
---|---|---|
committer | Stéphane Lenclud <github@lenclud.com> | 2019-02-07 13:24:14 +0100 |
commit | ecaf8b6403f57e5813190f4ae1b89780c45339d8 (patch) | |
tree | e55a8a87891ec78d19d87b225900d72408bb621e /tracker-kinect-face | |
parent | 57285c2269f53bc7ae61f40289edc9083432bc8a (diff) |
Kinect: Fixing tracking validity check.
Diffstat (limited to 'tracker-kinect-face')
-rw-r--r-- | tracker-kinect-face/kinect_face_tracker.cpp | 6 |
1 files 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; |