diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2021-09-27 16:51:36 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2021-09-27 16:51:52 +0200 |
commit | dce50f45d7dcb4fda3c4f30bbb89a2dab9500afd (patch) | |
tree | c3072eaa26e1b1e9ec513acd94f87906372c1562 /tracker-pt/module | |
parent | cca0f96a0c8330a3c1f23c786129148de1073798 (diff) |
tracker/pt: for hidpi blob drawing in preview
Diffstat (limited to 'tracker-pt/module')
-rw-r--r-- | tracker-pt/module/point_extractor.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tracker-pt/module/point_extractor.cpp b/tracker-pt/module/point_extractor.cpp index 9814d974..6f42bb4e 100644 --- a/tracker-pt/module/point_extractor.cpp +++ b/tracker-pt/module/point_extractor.cpp @@ -248,10 +248,7 @@ static void draw_blobs(cv::Mat& preview_frame, const blob* blobs, unsigned nblob cy = preview_frame.rows / f(size.height), c = std::fmax(f(1), cx+cy)/2; - constexpr unsigned fract_bits = 8; - constexpr int c_fract(1 << fract_bits); - - cv::Point p(iround(b.pos[0] * cx * c_fract), iround(b.pos[1] * cy * c_fract)); + cv::Point p(iround(b.pos[0] * cx), iround(b.pos[1] * cy)); auto circle_color = k >= PointModel::N_POINTS ? cv::Scalar(192, 192, 192) @@ -259,9 +256,8 @@ static void draw_blobs(cv::Mat& preview_frame, const blob* blobs, unsigned nblob const int overlay_size = iround(dpi); - cv::circle(preview_frame, p, iround((b.radius + f(3.3) * c) * c_fract), - circle_color, overlay_size, - cv::LINE_AA, fract_bits); + cv::circle(preview_frame, p, iround((b.radius + f(2)) * c), + circle_color, overlay_size, cv::LINE_AA); char buf[16]; std::snprintf(buf, sizeof(buf), "%.2fpx", (double)b.radius); |