summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/point_tracker.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-12-18 19:57:42 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-12-18 19:57:42 +0100
commit8a60f1c9613d396b50aa6adec4b1f5ffdb9e9806 (patch)
tree7c92080112cfbcd0383fb3ff304abefa19a13379 /tracker-pt/point_tracker.h
parent84fb0aab5633a98fd2aef7d9e642628e826e2a9d (diff)
tracker/pt: reduce mutex contention
Diffstat (limited to 'tracker-pt/point_tracker.h')
-rw-r--r--tracker-pt/point_tracker.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tracker-pt/point_tracker.h b/tracker-pt/point_tracker.h
index cdcf2998..2757f22c 100644
--- a/tracker-pt/point_tracker.h
+++ b/tracker-pt/point_tracker.h
@@ -15,9 +15,8 @@
#include "ftnoir_tracker_pt_settings.h"
#include <QObject>
+#include <QMutex>
-// ----------------------------------------------------------------------------
-// Affine frame trafo
class Affine
{
public:
@@ -116,7 +115,7 @@ public:
// f : (focal length)/(sensor width)
// dt : time since last call
void track(const std::vector<cv::Vec2f>& projected_points, const PointModel& model, float f, bool dynamic_pose, int init_phase_timeout);
- Affine pose() const { return X_CM; }
+ Affine pose() { QMutexLocker l(&mtx); return X_CM; }
cv::Vec2f project(const cv::Vec3f& v_M, float f);
private:
// the points in model order
@@ -138,6 +137,7 @@ private:
Timer t;
bool init_phase;
+ QMutex mtx;
};
#endif //POINTTRACKER_H