diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-12-20 23:28:39 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-12-20 23:28:39 +0100 |
commit | 7f82af417e6941148c36b8e01f342f9390c57dfa (patch) | |
tree | c45e131d7ff8080fb56e0db4d7cb3c0cf13bcd8c /ftnoir_tracker_pt | |
parent | 15f66b14de5e1bf3ecff0450040c8e1ddb77116a (diff) |
pt: fix calibration wrong sign
Issue: #106
Diffstat (limited to 'ftnoir_tracker_pt')
-rw-r--r-- | ftnoir_tracker_pt/ftnoir_tracker_pt.cpp | 2 | ||||
-rw-r--r-- | ftnoir_tracker_pt/trans_calib.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp index 2cf09a26..11814756 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp @@ -82,7 +82,7 @@ void Tracker::run() { Affine CM; pose(&CM); - cv::Vec3f MH(s.t_MH_x, s.t_MH_y, s.t_MH_z); + cv::Vec3f MH(-s.t_MH_x, -s.t_MH_y, -s.t_MH_z); cv::Vec3f p = CM.t - MH; float fx = get_focal_length(); cv::Vec2f p_(p[0] / p[2] * fx, p[1] / p[2] * fx); diff --git a/ftnoir_tracker_pt/trans_calib.cpp b/ftnoir_tracker_pt/trans_calib.cpp index efafefb7..2994eb48 100644 --- a/ftnoir_tracker_pt/trans_calib.cpp +++ b/ftnoir_tracker_pt/trans_calib.cpp @@ -40,5 +40,5 @@ void TranslationCalibrator::update(const Matx33f& R_CM_k, const Vec3f& t_CM_k) Vec3f TranslationCalibrator::get_estimate() { Vec6f x = P.inv() * y; - return Vec3f(x[0], x[1], x[2]); + return Vec3f(-x[0], -x[1], -x[2]); } |