summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-01-04 21:22:07 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-01-04 21:22:07 +0100
commitd98d36c9acc66fb3158f77274189c92b1330fbf6 (patch)
tree115c06a322112051e7757ff36f3c2082fc4bda5a /tracker-pt
parentd1ab12d208006830771ba64233692668f339f57f (diff)
Revert "tracker/pt: remove arbitrary min brightness threshold"
This reverts commit 8ac0471c1c0c4cdf76f696b7c3c18d1d3a776a78. Discussion: #1381
Diffstat (limited to 'tracker-pt')
-rw-r--r--tracker-pt/module/point_extractor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tracker-pt/module/point_extractor.cpp b/tracker-pt/module/point_extractor.cpp
index 71586eb1..fbb830d3 100644
--- a/tracker-pt/module/point_extractor.cpp
+++ b/tracker-pt/module/point_extractor.cpp
@@ -220,8 +220,9 @@ void PointExtractor::threshold_image(const cv::Mat& frame_gray, cv::Mat1b& outpu
float const* const __restrict ptr = hist.ptr<float>(0);
const unsigned area = unsigned(iround(3 * pi * radius*radius));
const unsigned sz = unsigned(hist.cols * hist.rows);
- unsigned thres = 1;
- for (unsigned i = sz-1, cnt = 0; i > 1; i--)
+ constexpr unsigned min_thres = 64;
+ unsigned thres = min_thres;
+ for (unsigned i = sz-1, cnt = 0; i > 32; i--)
{
cnt += (unsigned)ptr[i];
if (cnt >= area)