From d42a9b7051051340c655417b157191d6a927044e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 21 Dec 2014 12:38:08 +0100 Subject: pt: show model center in different color to avoid confusion --- ftnoir_tracker_pt/ftnoir_tracker_pt.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp index 11814756..7be8ac03 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp @@ -90,10 +90,13 @@ void Tracker::run() points.push_back(p_); } - for (auto p : points) + for (int i = 0; i < points.size(); i++) { + auto& p = points[i]; auto p2 = cv::Point(p[0] * frame.cols + frame.cols/2, -p[1] * frame.cols + frame.rows/2); cv::Scalar color(0, 255, 0); + if (i == points.size()-1) + color = cv::Scalar(0, 0, 255); cv::line(frame, cv::Point(p2.x - 20, p2.y), cv::Point(p2.x + 20, p2.y), -- cgit v1.2.3