From 107df605feaeeffdb99e4eef5182279efedbf511 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 29 Jul 2017 09:55:23 +0200 Subject: tracker/pt: revert most 2.3.8 changes Remove contour usage. They're less precise than flood fill. Keep sensible changes. --- tracker-pt/point_extractor.h | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'tracker-pt/point_extractor.h') diff --git a/tracker-pt/point_extractor.h b/tracker-pt/point_extractor.h index 1016977c..61e2bc03 100644 --- a/tracker-pt/point_extractor.h +++ b/tracker-pt/point_extractor.h @@ -17,20 +17,17 @@ #include -//#define DEBUG_MEANSHIFT - -namespace pt_extractor_impl { +namespace pt_impl { using namespace types; struct blob { - double radius, value; + double radius, brightness; vec2 pos; cv::Rect rect; - unsigned idx; - blob(double radius, const cv::Vec2d& pos, double value, const cv::Rect &rect, unsigned idx); + blob(double radius, const cv::Vec2d& pos, double brightness, cv::Rect &rect); }; class PointExtractor final @@ -45,14 +42,14 @@ public: private: static constexpr int max_blobs = 16; - cv::Mat1b frame_bin, frame_gray; - cv::Mat1b contour_masks[max_blobs]; - cv::Mat1f hist; + cv::Mat frame_gray; + cv::Mat frame_bin; + cv::Mat hist; + cv::Mat frame_blobs; std::vector blobs; - std::vector> contours; }; -} // ns pt_extractor_impl +} // ns impl -using pt_extractor_impl::PointExtractor; +using pt_impl::PointExtractor; -- cgit v1.2.3