From 4b77e13d86135b55bd33de49322ed42219680162 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 5 Jan 2022 21:10:23 +0100 Subject: tracker/pt: use stricter boundaries for meanshift --- tracker-pt/module/point_extractor.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'tracker-pt/module') 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 -- cgit v1.2.3