summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/point_extractor.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-03-07 01:11:21 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-03-07 01:11:21 +0100
commitd241a49ec83d8a146ceddca44b1281c7e4c9da50 (patch)
treed31e95887ebabf85a06c7ccddcba773d30f96d97 /tracker-pt/point_extractor.h
parent1ab1d2c72315c03bf10c5c78bb6b3b674926039f (diff)
parent69005c7e0295b1b6f39e7d3f3d9d2911a31e246c (diff)
Merge branch 'unstable' into trackhattrackhat-1.2p1
Diffstat (limited to 'tracker-pt/point_extractor.h')
-rw-r--r--tracker-pt/point_extractor.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/tracker-pt/point_extractor.h b/tracker-pt/point_extractor.h
index 030251ff..3e4661f9 100644
--- a/tracker-pt/point_extractor.h
+++ b/tracker-pt/point_extractor.h
@@ -12,9 +12,10 @@
#include <opencv2/imgproc/imgproc.hpp>
#include "ftnoir_tracker_pt_settings.h"
-
#include <QMutex>
+#include <vector>
+
class PointExtractor
{
public:
@@ -22,7 +23,7 @@ public:
// dt: time since last call in seconds
// WARNING: returned reference is valid as long as object
const std::vector<cv::Vec2f> &extract_points(cv::Mat &frame);
- const std::vector<cv::Vec2f>& get_points() { QMutexLocker l(&mtx); return points; }
+ int get_n_points() { QMutexLocker l(&mtx); return points.size(); }
PointExtractor();
settings_pt s;
@@ -33,6 +34,22 @@ private:
cv::Mat frame_gray;
cv::Mat frame_bin;
cv::Mat hist;
+
+ enum { max_blobs = 16 };
+
+ struct blob
+ {
+ double radius;
+ cv::Vec2d pos;
+ double confid;
+ blob(double radius, const cv::Vec2d& pos, double confid) : radius(radius), pos(pos), confid(confid)
+ {
+ //qDebug() << "radius" << radius << "pos" << pos[0] << pos[1] << "confid" << confid;
+ }
+ };
+
+ std::vector<blob> blobs;
+ std::vector<std::vector<cv::Point>> contours;
};
#endif //POINTEXTRACTOR_H