diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-07-19 04:32:16 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-07-19 07:17:25 +0200 |
commit | 8d2c70f000ca00c8ebc571467a383a03442282df (patch) | |
tree | 4eea5c8edd8cd0c027bbbb2ac76b21d607783285 /tracker-pt | |
parent | 274aa3c09364834c64fc298927edaf275b7a9876 (diff) |
tracker/pt: round text position of displayed point radii
Diffstat (limited to 'tracker-pt')
-rw-r--r-- | tracker-pt/point_extractor.cpp | 8 |
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); } } } |