diff options
-rw-r--r-- | tracker-pt/module/point_extractor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tracker-pt/module/point_extractor.cpp b/tracker-pt/module/point_extractor.cpp index 17f03f4d..298d8752 100644 --- a/tracker-pt/module/point_extractor.cpp +++ b/tracker-pt/module/point_extractor.cpp @@ -209,9 +209,9 @@ static void draw_blobs(cv::Mat& preview_frame, const blob* blobs, unsigned nblob const f cx = preview_frame.cols / f(size.width), cy = preview_frame.rows / f(size.height), - c = (cx+cy)/2; + c = std::fmax(f(1), cx+cy)/2; - constexpr unsigned fract_bits = 16; + 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)); @@ -220,9 +220,9 @@ static void draw_blobs(cv::Mat& preview_frame, const blob* blobs, unsigned nblob ? cv::Scalar(192, 192, 192) : cv::Scalar(255, 255, 0); - const int overlay_size = (double)dpi > 1.5 ? 2 : 1; + const int overlay_size = iround(dpi); - cv::circle(preview_frame, p, iround((b.radius + f(3.3)) * c * c_fract), + cv::circle(preview_frame, p, iround((b.radius + f(3.3) * c) * c_fract), circle_color, overlay_size, cv::LINE_AA, fract_bits); |