summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-02-06 11:57:12 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-02-06 11:57:12 +0100
commit745feda3d244eeb4a5ec7575489eff72f76b42f3 (patch)
tree6168127e8f79cdeea5e991c2fb4631e6b261ce18 /tracker-pt
parent55cf7286867061bd2bd3577fbfd32526e6d8a012 (diff)
tracker/pt: make point size match slider
Diffstat (limited to 'tracker-pt')
-rw-r--r--tracker-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 24a7467b..52cbd7a7 100644
--- a/tracker-pt/point_extractor.cpp
+++ b/tracker-pt/point_extractor.cpp
@@ -69,12 +69,12 @@ void PointExtractor::extract_points(cv::Mat& frame, std::vector<cv::Vec2d>& poin
const double radius = max(0., (max_radius-min_radius) * s.threshold / 256);
const int area = int(round(3 * M_PI * (min_radius + radius)*(min_radius+radius)));
auto ptr = reinterpret_cast<const float*>(hist.ptr(0));
- for (int i = sz-1; i > 0; i--)
+ for (int i = sz-1; i > 32; i--)
{
cnt += ptr[i];
if (cnt >= area)
{
- thres = i;
+ thres = std::min(255, i+1);
break;
}
}