diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-07-19 08:10:42 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-07-19 08:10:42 +0200 |
commit | 0b6289589656e957c070d46b65ef4e93707324f3 (patch) | |
tree | 0131cca6948035c1281a261fe8666013558e144d /tracker-pt/point_extractor.h | |
parent | 223ff7abf556d7af4b1aeb63a4dc1664fd9d6161 (diff) |
tracker/pt: reduce locking
Diffstat (limited to 'tracker-pt/point_extractor.h')
-rw-r--r-- | tracker-pt/point_extractor.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tracker-pt/point_extractor.h b/tracker-pt/point_extractor.h index 478418e6..f4839208 100644 --- a/tracker-pt/point_extractor.h +++ b/tracker-pt/point_extractor.h @@ -14,7 +14,6 @@ #include "ftnoir_tracker_pt_settings.h" #include "opentrack-compat/pi-constant.hpp" -#include <QMutex> #include <vector> @@ -24,23 +23,19 @@ public: // extracts points from frame and draws some processing info into frame, if draw_output is set // dt: time since last call in seconds // WARNING: returned reference is valid as long as object - const std::vector<vec2>& extract_points(cv::Mat &frame); - int get_n_points() { QMutexLocker l(&mtx); return points.size(); } + void extract_points(cv::Mat &frame, std::vector<vec2>& points); PointExtractor(); settings_pt s; private: static constexpr double pi = OPENTRACK_PI; + static constexpr int max_blobs = 16; - std::vector<vec2> points; - QMutex mtx; cv::Mat frame_gray; cv::Mat frame_bin; cv::Mat hist; cv::Mat frame_blobs; - static constexpr int max_blobs = 16; - struct blob { double radius; |