summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-07-19 04:32:16 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-07-19 07:17:25 +0200
commit8d2c70f000ca00c8ebc571467a383a03442282df (patch)
tree4eea5c8edd8cd0c027bbbb2ac76b21d607783285 /tracker-pt
parent274aa3c09364834c64fc298927edaf275b7a9876 (diff)
tracker/pt: round text position of displayed point radii
Diffstat (limited to 'tracker-pt')
-rw-r--r--tracker-pt/point_extractor.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tracker-pt/point_extractor.cpp b/tracker-pt/point_extractor.cpp
index 23fe7a38..acba1c64 100644
--- a/tracker-pt/point_extractor.cpp
+++ b/tracker-pt/point_extractor.cpp
@@ -135,7 +135,13 @@ const std::vector<PointExtractor::vec2>& PointExtractor::extract_points(cv::Mat&
{
char buf[64];
sprintf(buf, "%.2fpx", radius);
- cv::putText(frame, buf, cv::Point(b.pos[0]+30, b.pos[1]+20), cv::FONT_HERSHEY_DUPLEX, 1, cv::Scalar(0, 0, 255), 1);
+ cv::putText(frame,
+ buf,
+ cv::Point(std::round(b.pos[0]+30), std::round(b.pos[1]+20)),
+ cv::FONT_HERSHEY_DUPLEX,
+ 1,
+ cv::Scalar(0, 0, 255),
+ 1);
}
}
}