From 7da7a26385c1d54762d6f2d11a7036d856bc5864 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 11 Jan 2014 18:07:48 +0100 Subject: use correct scale for point coords --- FTNoIR_Tracker_PT/ftnoir_tracker_pt.cpp | 2 +- FTNoIR_Tracker_PT/point_tracker.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 c94fa3ff..9f74127f 100644 --- a/FTNoIR_Tracker_PT/ftnoir_tracker_pt.cpp +++ b/FTNoIR_Tracker_PT/ftnoir_tracker_pt.cpp @@ -86,7 +86,7 @@ void Tracker::run() for (auto p : points) { auto p2 = cv::Point(p[0] * frame.cols + frame.cols/2, - p[1] * frame.rows + frame.rows/2); + -p[1] * frame.cols + frame.rows/2); cv::Scalar color(0, 255, 0); qDebug() << p2.x << p2.y; cv::line(frame, diff --git a/FTNoIR_Tracker_PT/point_tracker.cpp b/FTNoIR_Tracker_PT/point_tracker.cpp index 69d46645..faac9963 100644 --- a/FTNoIR_Tracker_PT/point_tracker.cpp +++ b/FTNoIR_Tracker_PT/point_tracker.cpp @@ -244,7 +244,7 @@ void PointTracker::POSIT(float fov, int w, int h) for (int i = 0; i < 3; i++) { - auto p2 = cv::Point(p[i][0] * w + w/2, p[i][1] * h + h/2); + auto p2 = cv::Point(p[i][0] * w + w/2, -p[i][1] * h + w/2); img_points.push_back(p2); } -- cgit v1.2.3