summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/point_extractor.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-02-21 20:20:17 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-02-21 20:20:17 +0100
commitd90d57a85d81bc16e14310e41c820f47e110e484 (patch)
tree829895cbc58670947c437994e929b0f3fcf01a9e /tracker-pt/point_extractor.cpp
parent530f61f9c8e128a1ab2834048f8cdde527c58b84 (diff)
tracker/pt: change meanshift kernel size coefficient
From my usage the value of 1.5 is excessively conservative.
Diffstat (limited to 'tracker-pt/point_extractor.cpp')
-rw-r--r--tracker-pt/point_extractor.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tracker-pt/point_extractor.cpp b/tracker-pt/point_extractor.cpp
index 3109db09..8cd4e1f3 100644
--- a/tracker-pt/point_extractor.cpp
+++ b/tracker-pt/point_extractor.cpp
@@ -223,6 +223,7 @@ end:
{
blob &b = blobs[idx];
cv::Rect rect = b.rect;
+
rect.x -= rect.width / 2;
rect.y -= rect.height / 2;
rect.width *= 2;
@@ -231,7 +232,11 @@ end:
cv::Mat frame_roi = frame_gray(rect);
- const double kernel_radius = b.radius * 1.5;
+ // smaller values mean more changes. 1 makes too many changes while 1.5 makes about .1
+ // seems values close to 1.3 reduce noise best with about .15->.2 changes
+ static constexpr double radius_c = 1.3;
+
+ const double kernel_radius = b.radius * radius_c;
cv::Vec2d pos(b.pos[0] - rect.x, b.pos[1] - rect.y); // position relative to ROI.
for (int iter = 0; iter < 10; ++iter)