summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-05-13 22:40:51 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-05-13 22:40:51 +0200
commit18c0e8ff59c715ff92cbbd926d0f4f998eebeb7b (patch)
treed2e8a4b00c471d5faab8471f81739b47854829ad /tracker-pt
parent7b54b8e1c707d1b4d5efaa0ad814b1d78dd55aa2 (diff)
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
Diffstat (limited to 'tracker-pt')
-rwxr-xr-xtracker-pt/point_extractor.cpp4
1 files 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<cv::Vec2f>& 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<int>(0, min_pixels * s.threshold/100.);
+ constexpr int min_pixels = 400;
+ const int pixels_to_include = std::max<int>(0, min_pixels * s.threshold / 255);
auto ptr = reinterpret_cast<const float*>(hist.ptr(0));
for (int i = sz-1; i >= 0; i--)
{