summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-01-05 21:10:23 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-01-05 21:10:40 +0100
commit4b77e13d86135b55bd33de49322ed42219680162 (patch)
treebe88a93a50927a7389b2de3e5a82dc90c53329e8 /tracker-pt
parentbe0dc76b8f2db1a1a7ccc782a6c388193f4cf3ce (diff)
tracker/pt: use stricter boundaries for meanshift
Diffstat (limited to 'tracker-pt')
-rw-r--r--tracker-pt/module/point_extractor.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/tracker-pt/module/point_extractor.cpp b/tracker-pt/module/point_extractor.cpp
index ff7a8699..4a715496 100644
--- a/tracker-pt/module/point_extractor.cpp
+++ b/tracker-pt/module/point_extractor.cpp
@@ -390,14 +390,7 @@ end:
for (idx = 0; idx < sz; ++idx)
{
blob& b = blobs[idx];
- cv::Rect rect = b.rect;
-
- rect.x -= rect.width / 2;
- rect.y -= rect.height / 2;
- rect.width *= 2;
- rect.height *= 2;
- rect &= cv::Rect(0, 0, W, H); // crop at frame boundaries
-
+ cv::Rect rect = b.rect & cv::Rect(0, 0, W, H); // crop at frame boundaries
cv::Mat frame_roi = frame_gray(rect);
// smaller values mean more changes. 1 makes too many changes while 1.5 makes about .1