diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-03-06 09:11:19 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-03-07 00:35:36 +0100 |
commit | 99fb0282ba5cdfdb2b889df8916b36207d21ded0 (patch) | |
tree | 2281ba7bf6dd94e2e5ddfab94c7bc12873df4776 /tracker-pt/point_extractor.h | |
parent | 68132ca8a66d5757bc42aebeb64a9e2bea53f5ac (diff) |
tracker/pt: less malloc/free each frame
Diffstat (limited to 'tracker-pt/point_extractor.h')
-rw-r--r-- | tracker-pt/point_extractor.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/tracker-pt/point_extractor.h b/tracker-pt/point_extractor.h index ab51762d..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: @@ -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 |