From f7ebbcc2f6fdc3f835b323d7515a5291daa90481 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 28 Jul 2013 14:08:42 +0200 Subject: Apply translation compensation for yaw/pitch --- ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index 171b8df3..200010e8 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -244,6 +244,9 @@ void Tracker::run() pose[Yaw] = foo[1]; pose[Pitch] = -foo[0]; pose[Roll] = foo[2]; + + pose[Yaw] -= atan(pose[TX] / pose[TZ]) * 180 / HT_PI; + pose[Pitch] -= atan(pose[TY] / pose[TZ]) * 180 / HT_PI; } frame = color.clone(); @@ -252,8 +255,6 @@ void Tracker::run() bool Tracker::GiveHeadPoseData(double *data) { - bool ret = false; - QMutexLocker lck(&mtx); if (frame.rows > 0) -- cgit v1.2.3