summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/point_extractor.h
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-pt/point_extractor.h')
-rw-r--r--tracker-pt/point_extractor.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/tracker-pt/point_extractor.h b/tracker-pt/point_extractor.h
index b9368ab6..80c1897d 100644
--- a/tracker-pt/point_extractor.h
+++ b/tracker-pt/point_extractor.h
@@ -13,8 +13,8 @@
#include "ftnoir_tracker_pt_settings.h"
-// ----------------------------------------------------------------------------
-// Extracts points from an opencv image
+#include <QMutex>
+
class PointExtractor
{
public:
@@ -22,12 +22,13 @@ public:
// dt: time since last call in seconds
// WARNING: returned reference is valid as long as object
std::vector<cv::Vec2f> extract_points(cv::Mat &frame);
- const std::vector<cv::Vec2f>& get_points() { return points; }
+ const std::vector<cv::Vec2f>& get_points() { QMutexLocker l(&mtx); return points; }
PointExtractor();
settings_pt s;
private:
std::vector<cv::Vec2f> points;
+ QMutex mtx;
};
#endif //POINTEXTRACTOR_H