summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/point_extractor.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-07-19 08:10:42 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-07-19 08:10:42 +0200
commit0b6289589656e957c070d46b65ef4e93707324f3 (patch)
tree0131cca6948035c1281a261fe8666013558e144d /tracker-pt/point_extractor.h
parent223ff7abf556d7af4b1aeb63a4dc1664fd9d6161 (diff)
tracker/pt: reduce locking
Diffstat (limited to 'tracker-pt/point_extractor.h')
-rw-r--r--tracker-pt/point_extractor.h9
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;