From 18c0e8ff59c715ff92cbbd926d0f4f998eebeb7b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 13 May 2016 22:40:51 +0200 Subject: tracker/pt: adjust auto threshold max pixel value The confusion stems from the max slider value. It's 255, not 100 as is the default. Max pixel count change to 20 was confused as we'll counting area and not radius here. Taking into account that the value was divided by 100 previously, it's bit less than the previous one but not as confused as then. Reported-by: @MathijsG Issue: #355 --- tracker-pt/point_extractor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tracker-pt/point_extractor.cpp b/tracker-pt/point_extractor.cpp index 25b825fd..be1cd59c 100755 --- a/tracker-pt/point_extractor.cpp +++ b/tracker-pt/point_extractor.cpp @@ -116,8 +116,8 @@ const std::vector& PointExtractor::extract_points(cv::Mat& frame) const int sz = hist.cols * hist.rows; int val = 0; int cnt = 0; - constexpr int min_pixels = 20; - const auto pixels_to_include = std::max(0, min_pixels * s.threshold/100.); + constexpr int min_pixels = 400; + const int pixels_to_include = std::max(0, min_pixels * s.threshold / 255); auto ptr = reinterpret_cast(hist.ptr(0)); for (int i = sz-1; i >= 0; i--) { -- cgit v1.2.3