summaryrefslogtreecommitdiffhomepage
path: root/tracker-kinect-face/tracker.cpp
diff options
context:
space:
mode:
authorStéphane Lenclud <github@lenclud.com>2019-02-02 17:36:05 +0100
committerStéphane Lenclud <github@lenclud.com>2019-02-07 13:24:13 +0100
commitba8796acda06c9ae5f528dbbf655c714844d5429 (patch)
tree15745d28c13bc1b71f514403d637faf273f16b4b /tracker-kinect-face/tracker.cpp
parent388a876b68a83956b687100007aab7afafbb08ab (diff)
Various fixes from code review.
Diffstat (limited to 'tracker-kinect-face/tracker.cpp')
-rw-r--r--tracker-kinect-face/tracker.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/tracker-kinect-face/tracker.cpp b/tracker-kinect-face/tracker.cpp
index 407557f0..c5517f89 100644
--- a/tracker-kinect-face/tracker.cpp
+++ b/tracker-kinect-face/tracker.cpp
@@ -38,7 +38,7 @@ bool IsNullVetor(const Vector4& aVector)
return false;
}
- if (aVector.y != 0)
+ if (aVector.x != 0)
{
return false;
}
@@ -74,7 +74,6 @@ bool IsNullPoint(const CameraSpacePoint& aPoint)
return false;
}
-
return true;
}
@@ -150,9 +149,9 @@ module_status KinectFaceTracker::start_tracker(QFrame* aFrame)
bool KinectFaceTracker::center()
{
+ // Mark our center
iFacePositionCenter = iFacePosition;
iFaceRotationCenter = iFaceRotation;
- //TODO: Rotation center too
return true;
}
@@ -181,11 +180,9 @@ void KinectFaceTracker::data(double *data)
data[2] = (iLastFacePosition.Z - iFacePositionCenter.Z) * 100;
// Yaw, Picth, Roll
- data[3] = 0-(iLastFaceRotation.X - iFaceRotationCenter.X); // Invert to be compatible with ED out-of-the-box
+ data[3] = -(iLastFaceRotation.X - iFaceRotationCenter.X); // Invert to be compatible with ED out-of-the-box
data[4] = (iLastFaceRotation.Y - iFaceRotationCenter.Y);
data[5] = (iLastFaceRotation.Z - iFaceRotationCenter.Z);
-
-
}
@@ -463,7 +460,7 @@ void KinectFaceTracker::ProcessFaces()
{
if (bFaceTracked)
{
- OutputDebugStringA("Tracking face!\n");
+ //OutputDebugStringA("Tracking face!\n");
//IFaceFrameResult* pFaceFrameResult = nullptr;
IFaceAlignment* pFaceAlignment = nullptr;