summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/ftnoir_tracker_pt.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-06-21 13:57:03 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-06-21 13:57:03 +0200
commit4de06e67025d8a5246a64ccd05312d2f7a2be2bc (patch)
tree6af1e8b2311f7a1b69513e208cd6d2012df67ca5 /tracker-pt/ftnoir_tracker_pt.cpp
parent06cf1e4a9ac6f7b22d56c6f1116b279f8589d688 (diff)
tracker/pt: less jerky crosses on the video feedopentrack-2.3-rc49p5
Diffstat (limited to 'tracker-pt/ftnoir_tracker_pt.cpp')
-rw-r--r--tracker-pt/ftnoir_tracker_pt.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp
index 2e6fd9b1..d680698f 100644
--- a/tracker-pt/ftnoir_tracker_pt.cpp
+++ b/tracker-pt/ftnoir_tracker_pt.cpp
@@ -120,7 +120,9 @@ void Tracker_PT::run()
std::function<void(const cv::Vec2f&, const cv::Scalar)> fun = [&](const cv::Vec2f& p, const cv::Scalar color)
{
- auto p2 = cv::Point(p[0] * frame_.cols + frame_.cols/2, -p[1] * frame_.cols + frame_.rows/2);
+ using std::round;
+ cv::Point p2(round(p[0] * frame_.cols + frame_.cols/2),
+ round(-p[1] * frame_.cols + frame_.rows/2));
cv::line(frame_,
cv::Point(p2.x - 20, p2.y),
cv::Point(p2.x + 20, p2.y),