diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-01-06 00:03:08 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-01-06 00:03:08 +0100 |
commit | f51d533928198d1e27cb74d5aec1cd3ee130c29a (patch) | |
tree | a733bec5beee110d1ac1db7102abbb4e8065ad81 | |
parent | 327204880f9153fec9645db68406767af854dde0 (diff) |
tracker/pt: bring back original centroid estimation codeopentrack-2022.1.0
-rw-r--r-- | tracker-pt/module/point_extractor.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tracker-pt/module/point_extractor.cpp b/tracker-pt/module/point_extractor.cpp index 6e79ef24..17819d78 100644 --- a/tracker-pt/module/point_extractor.cpp +++ b/tracker-pt/module/point_extractor.cpp @@ -268,7 +268,6 @@ static void draw_blobs(cv::Mat& preview_frame, const blob* blobs, unsigned nblob } } -#if 0 static vec2 meanshift_initial_guess(const cv::Rect rect, cv::Mat& frame_roi) { vec2 ret = {rect.width/(f)2, rect.height/(f)2}; @@ -292,7 +291,6 @@ static vec2 meanshift_initial_guess(const cv::Rect rect, cv::Mat& frame_roi) ret = { (f)(x / xnorm), (f)(y / ynorm) }; return ret; } -#endif void PointExtractor::extract_points(const pt_frame& frame_, pt_preview& preview_frame_, @@ -394,8 +392,7 @@ end: static constexpr f radius_c = f(1.75); const f kernel_radius = b.radius * radius_c; - //vec2 pos = meanshift_initial_guess(rect, frame_roi); // position relative to ROI. - vec2 pos(rect.width/f(2), rect.height/f(2)); // position relative to ROI. + vec2 pos = meanshift_initial_guess(rect, frame_roi); // position relative to ROI. for (int iter = 0; iter < 10; ++iter) { |