summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-06 10:01:24 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-06 10:47:44 +0200
commit2e7407a094c74b629cbe8348e9007c6373e476fe (patch)
tree10049a7d1eb41d442648741b77846119e95096bc /ftnoir_tracker_aruco/ftnoir_tracker_aruco.h
parent81d2ffa8b95f0dce0a89784d08fe3ba9501cca1e (diff)
aruco: use camera settings class
Diffstat (limited to 'ftnoir_tracker_aruco/ftnoir_tracker_aruco.h')
-rw-r--r--ftnoir_tracker_aruco/ftnoir_tracker_aruco.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h
index 875a9d41..297fecdb 100644
--- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h
+++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h
@@ -18,6 +18,7 @@
#include "opentrack/options.hpp"
#include "ftnoir_tracker_aruco/trans_calib.h"
#include "opentrack/plugin-api.hpp"
+#include "opentrack/opencv-camera-dialog.hpp"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
@@ -40,9 +41,12 @@ struct settings : opts {
{}
};
+class TrackerControls;
+
class Tracker : protected QThread, public ITracker
{
Q_OBJECT
+ friend class TrackerControls;
static constexpr double c_search_window = 2.65;
public:
Tracker();
@@ -52,6 +56,8 @@ public:
void run();
void getRT(cv::Matx33d &r, cv::Vec3d &t);
private:
+ cv::VideoCapture camera;
+ QMutex camera_mtx;
QMutex mtx;
volatile bool stop;
QHBoxLayout* layout;
@@ -59,12 +65,11 @@ private:
settings s;
double pose[6];
cv::Mat frame;
- cv::VideoCapture camera;
cv::Matx33d r;
cv::Vec3d t;
};
-class TrackerControls : public ITrackerDialog
+class TrackerControls : public ITrackerDialog, protected camera_dialog<Tracker>
{
Q_OBJECT
public:
@@ -83,4 +88,5 @@ private slots:
void toggleCalibrate();
void cleanupCalib();
void update_tracker_calibration();
+ void camera_settings();
};