summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/point_extractor.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-07-29 09:55:23 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-07-29 09:55:23 +0200
commit107df605feaeeffdb99e4eef5182279efedbf511 (patch)
tree077d5fbc2e7aa86fbd6874c3f3ed5211d111b6f9 /tracker-pt/point_extractor.h
parent90653e2533450f0feea670dc5337aa39cefbc213 (diff)
tracker/pt: revert most 2.3.8 changes
Remove contour usage. They're less precise than flood fill. Keep sensible changes.
Diffstat (limited to 'tracker-pt/point_extractor.h')
-rw-r--r--tracker-pt/point_extractor.h21
1 files changed, 9 insertions, 12 deletions
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 <vector>
-//#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<blob> blobs;
- std::vector<std::vector<cv::Point>> contours;
};
-} // ns pt_extractor_impl
+} // ns impl
-using pt_extractor_impl::PointExtractor;
+using pt_impl::PointExtractor;