From 7217cf5ac2191c92c956c88f012282882593bfc4 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 11 Jan 2014 16:27:09 +0100 Subject: fix translation estimation --- FTNoIR_Tracker_PT/point_tracker.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/FTNoIR_Tracker_PT/point_tracker.cpp b/FTNoIR_Tracker_PT/point_tracker.cpp index a881da62..2dd89aed 100644 --- a/FTNoIR_Tracker_PT/point_tracker.cpp +++ b/FTNoIR_Tracker_PT/point_tracker.cpp @@ -240,9 +240,11 @@ void PointTracker::POSIT(float fov, int w, int h) obj_points.push_back(point_model->M01); obj_points.push_back(point_model->M02); - img_points.push_back(p[0]); - img_points.push_back(p[1]); - img_points.push_back(p[2]); + for (int i = 0; i < 3; i++) + { + auto p2 = cv::Point(p[i][0] * w + w/2, p[i][1] * h + h/2); + img_points.push_back(p2); + } const float HT_PI = 3.1415926535; -- cgit v1.2.3