diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-26 23:56:59 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-27 01:05:52 +0200 |
commit | b327eb866272272f2669cca4ea78c4cb489f7298 (patch) | |
tree | 181213e1c1077929e105f89f214bc36daced81ae /ftnoir_tracker_aruco/ftnoir_tracker_aruco.h | |
parent | e5712bbc76b2f970169a7778edd0d8c9e84bae9e (diff) |
auto-reset camera on settings exit. avoid bugs in cv::videocapture
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'ftnoir_tracker_aruco/ftnoir_tracker_aruco.h')
-rw-r--r-- | ftnoir_tracker_aruco/ftnoir_tracker_aruco.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h index 5d3d4ed6..61eec096 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h @@ -28,6 +28,7 @@ public: bool GiveHeadPoseData(double *data); bool enableTX, enableTY, enableTZ, enableRX, enableRY, enableRZ; void run(); + void load_settings(); private: QMutex mtx; ArucoVideoWidget* videoWidget; @@ -36,10 +37,10 @@ private: float fov; int camera_index; int force_fps, force_width, force_height; - void load_settings(); double pose[6]; cv::Mat frame; double headpos[3]; + volatile bool reset; }; // Widget that has controls for FTNoIR protocol client-settings. @@ -53,14 +54,19 @@ public: void showEvent (QShowEvent *); void Initialize(QWidget *); - void registerTracker(ITracker *) {} - void unRegisterTracker() {} + void registerTracker(ITracker * x) { + tracker = dynamic_cast<Tracker*>(x); + } + void unRegisterTracker() { + tracker = nullptr; + } private: Ui::Form ui; void loadSettings(); void save(); bool settingsDirty; + Tracker* tracker; private slots: void doOK(); |