summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/ftnoir_tracker_pt.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/ftnoir_tracker_pt.h
parent223ff7abf556d7af4b1aeb63a4dc1664fd9d6161 (diff)
tracker/pt: reduce locking
Diffstat (limited to 'tracker-pt/ftnoir_tracker_pt.h')
-rw-r--r--tracker-pt/ftnoir_tracker_pt.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.h b/tracker-pt/ftnoir_tracker_pt.h
index d2f69ac2..b5e11157 100644
--- a/tracker-pt/ftnoir_tracker_pt.h
+++ b/tracker-pt/ftnoir_tracker_pt.h
@@ -44,9 +44,9 @@ public:
void start_tracker(QFrame* parent_window) override;
void data(double* data) override;
- Affine pose() { return point_tracker.pose(); }
- int get_n_points() { return point_extractor.get_n_points(); }
- bool get_cam_info(CamInfo* info) { QMutexLocker lock(&camera_mtx); return camera.get_info(*info); }
+ Affine pose();
+ int get_n_points();
+ bool get_cam_info(CamInfo* info);
public slots:
void apply_settings();
protected:
@@ -63,6 +63,7 @@ private:
bool get_focal_length(f& ret);
QMutex camera_mtx;
+ QMutex data_mtx;
CVCamera camera;
PointExtractor point_extractor;
PointTracker point_tracker;
@@ -73,9 +74,11 @@ private:
settings_pt s;
Timer time;
cv::Mat frame;
+ std::vector<vec2> points;
- volatile bool ever_success;
+ volatile unsigned point_count;
volatile unsigned char commands;
+ volatile bool ever_success;
static constexpr f rad2deg = f(180/OPENTRACK_PI);
//static constexpr float deg2rad = float(OPENTRACK_PI/180);