diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-26 08:01:57 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-26 08:02:15 +0100 |
commit | e5413ce3d7e282fee4f848938ef17b6f80794d77 (patch) | |
tree | 4a19d20f210f846fda193fe84c5e837f2e380f18 | |
parent | 1281445a90d43643a1088270e1d4f499ce38457f (diff) |
r/t comp wrong order
-rw-r--r-- | opentrack/tracker.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/opentrack/tracker.cpp b/opentrack/tracker.cpp index 0395365d..ad1938f9 100644 --- a/opentrack/tracker.cpp +++ b/opentrack/tracker.cpp @@ -92,13 +92,13 @@ static cv::Matx33d euler_to_rmat(const double* input) void Tracker::t_compensate(const cv::Matx33d& rmat, const double* xyz, double* output, bool rz) { - const double xyz_[3] = { xyz[2], -xyz[1], xyz[0] }; + const double xyz_[3] = { xyz[2], xyz[0], -xyz[1] }; cv::Matx31d tvec(xyz_); const cv::Matx31d ret = rmat * tvec; if (!rz) output[2] = ret(0, 0); - output[1] = -ret(1, 0); - output[0] = ret(2, 0); + output[0] = ret(1, 0); + output[1] = -ret(2, 0); } void Tracker::logic() |