Skip to content

Commit

Permalink
tracker/pt: bring back original centroid estimation code
Browse files Browse the repository at this point in the history
  • Loading branch information
sthalik committed Jan 5, 2022
1 parent 3272048 commit f51d533
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tracker-pt/module/point_extractor.cpp
Expand Up @@ -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};
Expand All @@ -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_,
Expand Down Expand Up @@ -394,8 +392,7 @@ void PointExtractor::extract_points(const pt_frame& frame_,
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)
{
Expand Down

0 comments on commit f51d533

Please sign in to comment.