summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/point_extractor.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-04-18 06:49:11 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-04-18 06:49:11 +0200
commit52a34d749c6b977a8c1e13a1f0106fd624b5f40a (patch)
tree68aaeb7147a941ac89166a53af25165ce78945ff /tracker-pt/point_extractor.h
parent95b9f8495735bc83e06fa4a17bd54fc553a48d10 (diff)
tracker/pt: replace original blob center search with meanshift
The functions are almost identical so why not. I removed several bits: - weighting by squared pixel value is bad. weight by pixel value instead. - making the ROI twice as big doesn't make sense and makes for misdetected blobs. remove it. - switch radius coefficient to something doing less iterations. - sprinkle some __restrict pointer qualifier. - cv::floodfill invocation had some hardcoded flag value. - point radius circle and the bullseye line length weren't adjusted by scaling ratio. while the circle fitted the radius tightly, it was now clutter, so I removed it, leaving only the properly-scaled bullseye. - brightness had to go sadly since it's not accumulated anymore.
Diffstat (limited to 'tracker-pt/point_extractor.h')
-rw-r--r--tracker-pt/point_extractor.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/tracker-pt/point_extractor.h b/tracker-pt/point_extractor.h
index f931edd5..3c0b76d8 100644
--- a/tracker-pt/point_extractor.h
+++ b/tracker-pt/point_extractor.h
@@ -38,13 +38,11 @@ private:
cv::Mat hist;
cv::Mat frame_blobs;
- struct blob
+ struct blob final
{
- double radius, brightness;
+ double radius;
vec2 pos;
cv::Rect rect;
-
- blob(double radius, const cv::Vec2d& pos, double brightness, cv::Rect &rect);
};
std::vector<blob> blobs;