From 4dc41d3d8642d90d52b667dd05b4f99735f83a37 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 11 Jul 2014 17:23:20 +0200 Subject: integrate PT axis of rotation estimation into AR --- ftnoir_tracker_aruco/aruco-trackercontrols.ui | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'ftnoir_tracker_aruco/aruco-trackercontrols.ui') diff --git a/ftnoir_tracker_aruco/aruco-trackercontrols.ui b/ftnoir_tracker_aruco/aruco-trackercontrols.ui index 1d5a4241..be237e3c 100644 --- a/ftnoir_tracker_aruco/aruco-trackercontrols.ui +++ b/ftnoir_tracker_aruco/aruco-trackercontrols.ui @@ -9,8 +9,8 @@ 0 0 - 615 - 326 + 636 + 346 @@ -110,6 +110,13 @@ + + + + Calibrate + + + -- cgit v1.2.3 From fb0cd9401e26aaf610356ffe899af268012d18c3 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 22 Sep 2014 11:39:07 +0200 Subject: remove obsolete axis selector from trackers --- ftnoir_tracker_aruco/aruco-trackercontrols.ui | 449 +++++++++------------ ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 24 +- ftnoir_tracker_aruco/ftnoir_tracker_aruco.h | 7 - ftnoir_tracker_freepie-udp/freepie-udp-controls.ui | 159 +------- .../ftnoir_tracker_freepie-udp.cpp | 9 +- .../ftnoir_tracker_freepie-udp.h | 6 +- .../ftnoir_tracker_freepie-udp_dialog.cpp | 3 - ftnoir_tracker_ht/ftnoir_tracker_ht.cpp | 26 +- ftnoir_tracker_ht/ftnoir_tracker_ht.h | 7 - ftnoir_tracker_ht/ht-trackercontrols.ui | 91 +---- .../ftnoir_hydra_clientcontrols.ui | 168 +------- ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp | 43 +- ftnoir_tracker_hydra/ftnoir_tracker_hydra.h | 15 +- .../ftnoir_tracker_hydra_dialog.cpp | 7 - ftnoir_tracker_pt/FTNoIR_PT_Controls.ui | 245 ----------- ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp | 7 - ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h | 9 - ftnoir_tracker_rift/ftnoir_rift_clientcontrols.ui | 200 +-------- ftnoir_tracker_rift/ftnoir_tracker_rift.cpp | 19 +- ftnoir_tracker_rift/ftnoir_tracker_rift.h | 8 +- ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp | 8 - ftnoir_tracker_udp/ftnoir_ftnclientcontrols.ui | 358 +--------------- ftnoir_tracker_udp/ftnoir_tracker_udp.cpp | 14 +- ftnoir_tracker_udp/ftnoir_tracker_udp.h | 10 +- ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp | 10 +- 25 files changed, 281 insertions(+), 1621 deletions(-) (limited to 'ftnoir_tracker_aruco/aruco-trackercontrols.ui') diff --git a/ftnoir_tracker_aruco/aruco-trackercontrols.ui b/ftnoir_tracker_aruco/aruco-trackercontrols.ui index be237e3c..e5654bd5 100644 --- a/ftnoir_tracker_aruco/aruco-trackercontrols.ui +++ b/ftnoir_tracker_aruco/aruco-trackercontrols.ui @@ -10,7 +10,7 @@ 0 0 636 - 346 + 368 @@ -19,243 +19,239 @@ 0 - - - 6666 - 6666 - - - HT tracker settings + Tracker settings - - - 7 - - - + + + - Head position + - - Qt::AlignCenter + + true - - - - - TY - - - - - + + + - TX + Horizontal FOV - - - - - 0 - 0 - + + + + - -10000.000000000000000 + 35.000000000000000 - 10000.000000000000000 + 180.000000000000000 + + + 52.000000000000000 - - + + - TZ + Frames per second - - - - - 0 - 0 - - - - -10000.000000000000000 - - - 10000.000000000000000 - + + + + + Default + + + + + 30 + + + + + 60 + + + + + 120 + + + + + 180 + + - - - - - 0 - 0 - - - - -10000.000000000000000 - - - 10000.000000000000000 + + + + Camera name - - + + + + + - Calibrate + Resolution - - - - - - - Enable axes - - - - 7 - - - 6 - - - 0 - - - 6 - - - 0 - - - - - RX - + + + + + 640x480 + + + + + 320x240 + + + + + 320x200 + + + + + Default (not recommended!) + + - - + + - TX + Red channel only - - + + - RY + Mileage may vary - - + + - TY + Marker pitch - - - - RZ + + + + -180.000000000000000 + + + 180.000000000000000 - - - - TZ + + + + Head center + + + + + Calibrate + + + + + + + TX + + + + + + + + 0 + 0 + + + + -10000.000000000000000 + + + 10000.000000000000000 + + + + + + + + 0 + 0 + + + + -10000.000000000000000 + + + 10000.000000000000000 + + + + + + + + 0 + 0 + + + + -10000.000000000000000 + + + 10000.000000000000000 + + + + + + + TZ + + + + + + + TY + + + + - - - - Frames per second - - - - - - - - - - - Default - - - - - 30 - - - - - 60 - - - - - 120 - - - - - 180 - - - - - - - - Recommended! - - - - - - - Camera name - - - - - - - - - - 35.000000000000000 - - - 180.000000000000000 - - - 52.000000000000000 - - - - + @@ -270,7 +266,7 @@ Qt::RichText - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter true @@ -286,93 +282,16 @@ - - - - Red channel only - - - - - - - - 640x480 - - - - - 320x240 - - - - - 320x200 - - - - - Default (not recommended!) - - - - - - - - Horizontal FOV - - - - + QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - -180.000000000000000 - - - 180.000000000000000 - - - - - - - Resolution - - - - - - - Marker pitch - - - - cameraFOV - cameraFPS - cameraName - resolution - red_only - marker_pitch - cx - cy - cz - rx - ry - rz - tx - ty - tz buttonBox diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index b70bef09..f469c7a4 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -380,18 +380,12 @@ void Tracker::GetHeadPoseData(double *data) { QMutexLocker lck(&mtx); - if (s.eyaw) - data[Yaw] = pose[Yaw]; - if (s.epitch) - data[Pitch] = pose[Pitch]; - if (s.eroll) - data[Roll] = pose[Roll]; - if (s.ex) - data[TX] = pose[TX] * .1; - if (s.ey) - data[TY] = pose[TY] * .1; - if (s.ez) - data[TZ] = pose[TZ] * .1; + data[Yaw] = pose[Yaw]; + data[Pitch] = pose[Pitch]; + data[Roll] = pose[Roll]; + data[TX] = pose[TX] * .1; + data[TY] = pose[TY] * .1; + data[TZ] = pose[TZ] * .1; } class TrackerDll : public Metadata @@ -456,12 +450,6 @@ TrackerControls::TrackerControls() tie_setting(s.resolution, ui.resolution); tie_setting(s.force_fps, ui.cameraFPS); tie_setting(s.fov, ui.cameraFOV); - tie_setting(s.eyaw, ui.rx); - tie_setting(s.epitch, ui.ry); - tie_setting(s.eroll, ui.rz); - tie_setting(s.ex, ui.tx); - tie_setting(s.ey, ui.ty); - tie_setting(s.ez, ui.tz); tie_setting(s.headpos_x, ui.cx); tie_setting(s.headpos_y, ui.cy); tie_setting(s.headpos_z, ui.cz); diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h index f2207aef..c431d27a 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h @@ -28,7 +28,6 @@ struct settings { value fov, headpos_x, headpos_y, headpos_z; value camera_index, force_fps, resolution; value red_only; - value eyaw, epitch, eroll, ex, ey, ez; value marker_pitch; settings() : b(bundle("aruco-tracker")), @@ -40,12 +39,6 @@ struct settings { force_fps(b, "force-fps", 0), resolution(b, "force-resolution", 0), red_only(b, "red-only", false), - eyaw(b, "enable-y", true), - epitch(b, "enable-p", true), - eroll(b, "enable-r", true), - ex(b, "enable-x", true), - ey(b, "enable-y", true), - ez(b, "enable-z", true), marker_pitch(b, "marker-pitch", 0) {} }; diff --git a/ftnoir_tracker_freepie-udp/freepie-udp-controls.ui b/ftnoir_tracker_freepie-udp/freepie-udp-controls.ui index 937dafaa..9870372a 100644 --- a/ftnoir_tracker_freepie-udp/freepie-udp-controls.ui +++ b/ftnoir_tracker_freepie-udp/freepie-udp-controls.ui @@ -9,8 +9,8 @@ 0 0 - 208 - 240 + 198 + 71 @@ -26,145 +26,31 @@ false - - - 0 - - - - - - - - 0 - - - 65535 - - - - - - - - 0 - 0 - - - - UDP port - - - - + + + + + + 0 + 0 + + + + UDP port + - - - - - 0 - 85 - + + + + 0 - - Enable axis + + 65535 - - - - - - 0 - 0 - - - - Roll - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - - 0 - 0 - - - - Yaw - - - - - - - - 0 - 0 - - - - Pitch - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - - + QDialogButtonBox::Cancel|QDialogButtonBox::Ok @@ -173,9 +59,6 @@ - - port - diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp index 7223a33f..718ec510 100644 --- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp +++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp @@ -92,12 +92,9 @@ void TrackerImpl::GetHeadPoseData(double *data) if (s.enable_z) data[TZ] = pose[TZ]; #endif - if (s.enable_yaw) - data[Yaw] = pose[Yaw]; - if (s.enable_pitch) - data[Pitch] = pose[Pitch]; - if (s.enable_roll) - data[Roll] = pose[Roll]; + data[Yaw] = pose[Yaw]; + data[Pitch] = pose[Pitch]; + data[Roll] = pose[Roll]; } extern "C" FTNOIR_TRACKER_BASE_EXPORT ITracker* CALLING_CONVENTION GetConstructor() diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h index 8cefb509..b3f028fc 100644 --- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h +++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h @@ -16,13 +16,9 @@ using namespace options; struct settings { pbundle b; value port; - value enable_roll, enable_pitch, enable_yaw; settings() : b(bundle("freepie-udp-tracker")), - port(b, "port", 4237), - enable_roll(b, "enable-roll", true), - enable_pitch(b, "enable-pitch", true), - enable_yaw(b, "enable-yaw", true) + port(b, "port", 4237) {} }; diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp index d845ff4a..1489e336 100644 --- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp +++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp @@ -9,9 +9,6 @@ TrackerDialog::TrackerDialog() connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); tie_setting(s.port, ui.port); - tie_setting(s.enable_yaw, ui.chkEnableYaw); - tie_setting(s.enable_pitch, ui.chkEnablePitch); - tie_setting(s.enable_roll, ui.chkEnableRoll); } void TrackerDialog::doOK() { diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp index ef7e185d..7d6fc24e 100644 --- a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp +++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp @@ -197,24 +197,16 @@ void Tracker::GetHeadPoseData(double *data) shm->frame.width = 0; } if (shm->result.filled) { - if (s.enableRX) - data[Yaw] = shm->result.rotx; - if (s.enableRY) { - data[Pitch] = shm->result.roty; - } - if (s.enableRZ) { - data[Roll] = shm->result.rotz; - } - if (s.enableTX) - data[TX] = shm->result.tx; - if (s.enableTY) - data[TY] = shm->result.ty; - if (s.enableTZ) - data[TZ] = shm->result.tz; if (fabs(data[Yaw]) > 60 || fabs(data[Pitch]) > 50 || fabs(data[Roll]) > 40) { shm->pause = true; } + data[Yaw] = shm->result.rotx; + data[Pitch] = shm->result.roty; + data[Roll] = shm->result.rotz; + data[TX] = shm->result.tx; + data[TY] = shm->result.ty; + data[TZ] = shm->result.tz; } else { shm->pause = false; } @@ -267,12 +259,6 @@ TrackerControls::TrackerControls() tie_setting(s.camera_idx, ui.cameraName); tie_setting(s.fps, ui.cameraFPS); tie_setting(s.fov, ui.cameraFOV); - tie_setting(s.enableTX, ui.tx); - tie_setting(s.enableTY, ui.ty); - tie_setting(s.enableTZ, ui.tz); - tie_setting(s.enableRX, ui.rx); - tie_setting(s.enableRY, ui.ry); - tie_setting(s.enableRZ, ui.rz); tie_setting(s.resolution, ui.resolution); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.h b/ftnoir_tracker_ht/ftnoir_tracker_ht.h index 583249dc..418137bc 100644 --- a/ftnoir_tracker_ht/ftnoir_tracker_ht.h +++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.h @@ -20,17 +20,10 @@ using namespace options; struct settings { pbundle b; - value enableTX, enableTY, enableTZ, enableRX, enableRY, enableRZ; value fov; value fps, camera_idx, resolution; settings() : b(bundle("HT-Tracker")), - enableTX(b, "enable-tx", true), - enableTY(b, "enable-ty", true), - enableTZ(b, "enable-tz", true), - enableRX(b, "enable-rx", true), - enableRY(b, "enable-ry", true), - enableRZ(b, "enable-rz", true), fov(b, "fov", 56), fps(b, "fps", 0), camera_idx(b, "camera-index", 0), diff --git a/ftnoir_tracker_ht/ht-trackercontrols.ui b/ftnoir_tracker_ht/ht-trackercontrols.ui index f57022c8..0b94ffc5 100644 --- a/ftnoir_tracker_ht/ht-trackercontrols.ui +++ b/ftnoir_tracker_ht/ht-trackercontrols.ui @@ -9,8 +9,8 @@ 0 0 - 531 - 166 + 354 + 158 @@ -52,91 +52,6 @@ - - - - Enable axes - - - - - 10 - 20 - 70 - 17 - - - - RX - - - - - - 10 - 40 - 70 - 17 - - - - RY - - - - - - 10 - 60 - 70 - 17 - - - - RZ - - - - - - 60 - 20 - 70 - 17 - - - - TX - - - - - - 60 - 40 - 70 - 17 - - - - TY - - - - - - 60 - 60 - 70 - 17 - - - - TZ - - - - @@ -214,7 +129,7 @@ - + QDialogButtonBox::Cancel|QDialogButtonBox::Ok diff --git a/ftnoir_tracker_hydra/ftnoir_hydra_clientcontrols.ui b/ftnoir_tracker_hydra/ftnoir_hydra_clientcontrols.ui index e5e41bec..7cfac075 100644 --- a/ftnoir_tracker_hydra/ftnoir_hydra_clientcontrols.ui +++ b/ftnoir_tracker_hydra/ftnoir_hydra_clientcontrols.ui @@ -9,8 +9,8 @@ 0 0 - 172 - 145 + 190 + 62 @@ -26,167 +26,15 @@ false - - - - - - 0 - 85 - + + + + + None whatsoever - - Enable Axis - - - - - - Pitch: - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - - - - X: - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - - - - Yaw: - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - Y: - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - Roll: - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - Z: - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - + QDialogButtonBox::Cancel|QDialogButtonBox::Ok diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp index 6345ac57..5770f015 100644 --- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp +++ b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp @@ -8,13 +8,10 @@ # define SIXENSE_UTILS_STATIC_LIB #endif #include -#include +Hydra_Tracker::Hydra_Tracker() : should_quit(false) {} -Hydra_Tracker::Hydra_Tracker() : should_quit(false) -{ - for (int i = 0; i < 6; i++) - newHeadPose[i] = 0; -} +#pragma GCC diagnostic ignored "-Wreorder" +#include Hydra_Tracker::~Hydra_Tracker() { @@ -38,33 +35,13 @@ void Hydra_Tracker::GetHeadPoseData(double *data) float ypr[3]; mat.getEulerAngles().fill(ypr); - newHeadPose[Yaw] = ypr[0]; - newHeadPose[Pitch] = ypr[1]; - newHeadPose[Roll] = ypr[2]; - - - newHeadPose[TX] = acd.controllers[0].pos[0]/50.0f; - newHeadPose[TY] = acd.controllers[0].pos[1]/50.0f; - newHeadPose[TZ] = acd.controllers[0].pos[2]/50.0f; - - if (s.bEnableX) { - data[TX] = newHeadPose[TX]; - } - if (s.bEnableY) { - data[TY] = newHeadPose[TY]; - } - if (s.bEnableY) { - data[TZ] = newHeadPose[TZ]; - } - if (s.bEnableYaw) { - data[Yaw] = newHeadPose[Yaw] * 57.295781f; - } - if (s.bEnablePitch) { - data[Pitch] = newHeadPose[Pitch] * 57.295781f; - } - if (s.bEnableRoll) { - data[Roll] = newHeadPose[Roll] * 57.295781f; - } + data[TX] = acd.controllers[0].pos[0]/50.0; + data[TY] = acd.controllers[0].pos[1]/50.0; + data[TZ] = acd.controllers[0].pos[2]/50.0; + constexpr double r2d = 57.295781; + data[Yaw] = ypr[0] * r2d; + data[Pitch] = ypr[1] * r2d; + data[Roll] = ypr[2] * r2d; } extern "C" FTNOIR_TRACKER_BASE_EXPORT ITracker* CALLING_CONVENTION GetConstructor() diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h index fdfc2643..2b3c84a7 100644 --- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h +++ b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h @@ -6,15 +6,8 @@ using namespace options; struct settings { pbundle b; - value bEnableRoll, bEnablePitch, bEnableYaw, bEnableX, bEnableY, bEnableZ; settings() : - b(bundle("tracker-hydra")), - bEnableRoll(b, "enable-rz", true), - bEnablePitch(b, "enable-ry", true), - bEnableYaw(b, "enable-rx", true), - bEnableX(b, "enable-tx", true), - bEnableY(b, "enable-ty", true), - bEnableZ(b, "enable-tz", true) + b(bundle("tracker-hydra")) {} }; @@ -25,15 +18,11 @@ public: ~Hydra_Tracker(); void StartTracker(QFrame *) override; void GetHeadPoseData(double *data) override; + virtual int preferredHz() override { return 250; } volatile bool should_quit; -protected: - void run(); // qthread override run method private: settings s; - bool isCalibrated; - double newHeadPose[6]; // Structure with new headpose QMutex mutex; - virtual int preferredHz() override { return 250; } }; class TrackerControls: public QWidget, public ITrackerDialog diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp b/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp index 6c98a0a1..3df77d15 100644 --- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp +++ b/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp @@ -9,13 +9,6 @@ QWidget() // Connect Qt signals to member-functions connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); - - tie_setting(s.bEnableYaw, ui.chkEnableYaw); - tie_setting(s.bEnablePitch, ui.chkEnablePitch); - tie_setting(s.bEnableRoll, ui.chkEnableRoll); - tie_setting(s.bEnableX, ui.chkEnableX); - tie_setting(s.bEnableY, ui.chkEnableY); - tie_setting(s.bEnableZ, ui.chkEnableZ); } void TrackerControls::doOK() { diff --git a/ftnoir_tracker_pt/FTNoIR_PT_Controls.ui b/ftnoir_tracker_pt/FTNoIR_PT_Controls.ui index 0bbec7e1..44dfc060 100644 --- a/ftnoir_tracker_pt/FTNoIR_PT_Controls.ui +++ b/ftnoir_tracker_pt/FTNoIR_PT_Controls.ui @@ -129,245 +129,6 @@ - - - - - 0 - 85 - - - - Enable Axis - - - - - - - - Roll: - - - chkEnableRoll - - - - - - - Pitch: - - - chkEnablePitch - - - - - - - Yaw: - - - chkEnableYaw - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - X: - - - chkEnableX - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - Y: - - - chkEnableY - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - Z: - - - chkEnableZ - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 40 - 20 - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - @@ -1723,12 +1484,6 @@ tabWidget reset_spin - chkEnableRoll - chkEnablePitch - chkEnableYaw - chkEnableX - chkEnableY - chkEnableZ camdevice_combo res_x_spin res_y_spin diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp index 00d10d13..4ba981a5 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp @@ -57,13 +57,6 @@ TrackerDialog::TrackerDialog() tie_setting(s.threshold_secondary, ui.threshold_secondary_slider); tie_setting(s.threshold, ui.threshold_slider); - tie_setting(s.bEnableYaw, ui.chkEnableYaw); - tie_setting(s.bEnablePitch, ui.chkEnablePitch); - tie_setting(s.bEnableRoll, ui.chkEnableRoll); - tie_setting(s.bEnableX, ui.chkEnableX); - tie_setting(s.bEnableY, ui.chkEnableY); - tie_setting(s.bEnableZ, ui.chkEnableZ); - tie_setting(s.min_point_size, ui.mindiam_spin); tie_setting(s.max_point_size, ui.maxdiam_spin); diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h b/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h index 109090b3..1eca1e35 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h @@ -38,9 +38,6 @@ struct settings value reset_time; - value bEnableYaw, bEnablePitch, bEnableRoll; - value bEnableX, bEnableY, bEnableZ; - value clip_ty, clip_tz, clip_by, clip_bz; value active_model_panel, cap_x, cap_y, cap_z; @@ -70,12 +67,6 @@ struct settings t_MH_y(b, "model-centroid-y", 0), t_MH_z(b, "model-centroid-z", 0), reset_time(b, "reset-time", 2000), - bEnableYaw(b, "enable-yaw", true), - bEnablePitch(b, "enable-pitch", true), - bEnableRoll(b, "enable-roll", true), - bEnableX(b, "enable-x", true), - bEnableY(b, "enable-y", true), - bEnableZ(b, "enable-z", true), clip_ty(b, "clip-ty", 0), clip_tz(b, "clip-tz", 0), clip_by(b, "clip-by", 0), diff --git a/ftnoir_tracker_rift/ftnoir_rift_clientcontrols.ui b/ftnoir_tracker_rift/ftnoir_rift_clientcontrols.ui index 62edbec5..20c8f00b 100644 --- a/ftnoir_tracker_rift/ftnoir_rift_clientcontrols.ui +++ b/ftnoir_tracker_rift/ftnoir_rift_clientcontrols.ui @@ -9,8 +9,8 @@ 0 0 - 532 - 481 + 218 + 200 @@ -33,7 +33,7 @@ false - + Yaw spring @@ -151,7 +151,7 @@ - + @@ -164,198 +164,6 @@ - - - - Axes - - - false - - - - QFormLayout::ExpandingFieldsGrow - - - - - - 0 - 0 - - - - Pitch: - - - - - - - - 0 - 0 - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - - - - - 0 - 0 - - - - Yaw: - - - - - - - - 0 - 0 - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - - 0 - 0 - - - - Roll: - - - - - - - - 0 - 0 - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - - 0 - 0 - - - - X - - - - - - - Qt::LeftToRight - - - - - - - - - - - 0 - 0 - - - - Y - - - - - - - Qt::LeftToRight - - - - - - - - - - - 0 - 0 - - - - Z - - - - - - - Qt::LeftToRight - - - - - - - - - diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp index 33d8f418..46e8c29f 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp +++ b/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp @@ -55,18 +55,13 @@ void Rift_Tracker::GetHeadPoseData(double *data) yaw += s.constant_drift; old_yaw=yaw; } - if (s.bEnableYaw) - data[Yaw] = yaw * 57.295781; - if (s.bEnablePitch) - data[Pitch] = pitch * -57.295781; - if (s.bEnableRoll) - data[Roll] = roll * 57.295781; - if (s.bEnableX) - data[TX] = pose.Position.x * -1e2; - if (s.bEnableY) - data[TY] = pose.Position.y * 1e2; - if (s.bEnableX) - data[TZ] = pose.Position.z * 1e2; + constexpr double d2r = 57.295781; + data[Yaw] = yaw * d2r; + data[Pitch] = pitch * -d2r; + data[Roll] = roll * d2r; + data[TX] = pose.Position.x * -1e2; + data[TY] = pose.Position.y * 1e2; + data[TZ] = pose.Position.z * 1e2; } } } diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.h b/ftnoir_tracker_rift/ftnoir_tracker_rift.h index ee51b2cb..de224ca5 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift.h +++ b/ftnoir_tracker_rift/ftnoir_tracker_rift.h @@ -12,16 +12,10 @@ using namespace options; struct settings { pbundle b; - value bEnableYaw, bEnablePitch, bEnableRoll, bEnableX, bEnableY, bEnableZ, useYawSpring; + value useYawSpring; value constant_drift, persistence, deadzone; settings() : b(bundle("Rift")), - bEnableYaw(b, "EnableYaw", true), - bEnablePitch(b, "EnablePitch", true), - bEnableRoll(b, "EnableRoll", true), - bEnableX(b, "EnableX", true), - bEnableY(b, "EnableY", true), - bEnableZ(b, "EnableZ", true), useYawSpring(b, "yaw-spring", false), constant_drift(b, "constant-drift", 0.000005), persistence(b, "persistence", 0.99999), diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp index cc8079bf..390eac0e 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp +++ b/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp @@ -9,14 +9,6 @@ QWidget() connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); - tie_setting(s.bEnableYaw, ui.chkEnableYaw); - tie_setting(s.bEnablePitch, ui.chkEnablePitch); - tie_setting(s.bEnableRoll, ui.chkEnableRoll); - - tie_setting(s.bEnableX, ui.chkEnableX); - tie_setting(s.bEnableY, ui.chkEnableY); - tie_setting(s.bEnableZ, ui.chkEnableZ); - tie_setting(s.constant_drift, ui.constantDrift); tie_setting(s.deadzone, ui.deadzone); tie_setting(s.persistence, ui.persistence); diff --git a/ftnoir_tracker_udp/ftnoir_ftnclientcontrols.ui b/ftnoir_tracker_udp/ftnoir_ftnclientcontrols.ui index 6f81a50b..f485e67f 100644 --- a/ftnoir_tracker_udp/ftnoir_ftnclientcontrols.ui +++ b/ftnoir_tracker_udp/ftnoir_ftnclientcontrols.ui @@ -9,8 +9,8 @@ 0 0 - 411 - 232 + 216 + 71 @@ -26,353 +26,35 @@ false - - - - - - - Port-number - - - - - - - 0 - - - 65535 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - 0 - 85 - - - - Enable Axis + + + + + Port - - - - 10 - 20 - 150 - 73 - - - - - - - Roll: - - - - - - - Pitch: - - - - - - - Yaw: - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - X: - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - Y: - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - Z: - - - - - - - - 20 - 16777215 - - - - Qt::LeftToRight - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 40 - 20 - - - - - - - - - - Qt::Vertical + + + + 0 - - - 20 - 40 - + + 65535 - - - - - - - - Enter the port-number for the remote PC. - - - true - - - - - - - Remember: you may have to change firewall-settings too! - - - - + - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - QLayout::SetDefaultConstraint - - - - - - 0 - 0 - - - - - 100 - 0 - - - - - 100 - 16777215 - - - - OK - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - - 100 - 16777215 - - - - Cancel - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 10 - 20 - - - - - + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + spinPortNumber - btnOK - btnCancel diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp index 1b6d9ddd..335616d5 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp @@ -62,18 +62,8 @@ void FTNoIR_Tracker::StartTracker(QFrame*) void FTNoIR_Tracker::GetHeadPoseData(double *data) { QMutexLocker foo(&mutex); - if (s.enable_x) - data[TX] = newHeadPose[TX]; - if (s.enable_y) - data[TY] = newHeadPose[TY]; - if (s.enable_z) - data[TZ] = newHeadPose[TZ]; - if (s.enable_yaw) - data[Yaw] = newHeadPose[Yaw]; - if (s.enable_pitch) - data[Pitch] = newHeadPose[Pitch]; - if (s.enable_roll) - data[Roll] = newHeadPose[Roll]; + for (int i = 0; i < 6; i++) + data[i] = last_recv_pose[i]; } extern "C" FTNOIR_TRACKER_BASE_EXPORT ITracker* CALLING_CONVENTION GetConstructor() diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.h b/ftnoir_tracker_udp/ftnoir_tracker_udp.h index 22c9c465..92d321b2 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp.h +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.h @@ -10,17 +10,9 @@ using namespace options; struct settings { pbundle b; value port; - value enable_roll, enable_pitch, enable_yaw, - enable_x, enable_y, enable_z; settings() : b(bundle("udp-tracker")), - port(b, "port", 4242), - enable_roll(b, "enable-roll", true), - enable_pitch(b, "enable-pitch", true), - enable_yaw(b, "enable-yaw", true), - enable_x(b, "enable-x", true), - enable_y(b, "enable-y", true), - enable_z(b, "enable-y", true) + port(b, "port", 4242) {} }; diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp index 17b174e8..16a59292 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp @@ -30,15 +30,9 @@ QWidget() { ui.setupUi( this ); - connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK())); - connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel())); + connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); + connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); - tie_setting(s.enable_x, ui.chkEnableX); - tie_setting(s.enable_y, ui.chkEnableY); - tie_setting(s.enable_z, ui.chkEnableZ); - tie_setting(s.enable_yaw, ui.chkEnableYaw); - tie_setting(s.enable_pitch, ui.chkEnablePitch); - tie_setting(s.enable_roll, ui.chkEnableRoll); tie_setting(s.port, ui.spinPortNumber); } -- cgit v1.2.3 From 42f13fed362891c5ca8f4d6f7ed070cbd09dd846 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 5 Oct 2014 21:38:43 +0200 Subject: nix market pitch, aruco credit doesn't fit anymore sadly --- ftnoir_tracker_aruco/aruco-trackercontrols.ui | 249 +++++++++++--------------- ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 34 +--- ftnoir_tracker_aruco/ftnoir_tracker_aruco.h | 4 +- 3 files changed, 117 insertions(+), 170 deletions(-) (limited to 'ftnoir_tracker_aruco/aruco-trackercontrols.ui') diff --git a/ftnoir_tracker_aruco/aruco-trackercontrols.ui b/ftnoir_tracker_aruco/aruco-trackercontrols.ui index e5654bd5..240ef5f8 100644 --- a/ftnoir_tracker_aruco/aruco-trackercontrols.ui +++ b/ftnoir_tracker_aruco/aruco-trackercontrols.ui @@ -9,8 +9,8 @@ 0 0 - 636 - 368 + 560 + 214 @@ -22,16 +22,17 @@ Tracker settings - - - - - - - - true + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok - + + + + + @@ -41,6 +42,12 @@ + + + 0 + 0 + + @@ -64,6 +71,12 @@ + + + 0 + 0 + + Default @@ -99,7 +112,14 @@ - + + + + 0 + 0 + + + @@ -110,6 +130,12 @@ + + + 0 + 0 + + 640x480 @@ -146,154 +172,93 @@ - - + + + + + + + + - Marker pitch + Head X - - + + + + + 0 + 0 + + - -180.000000000000000 + -10000.000000000000000 - 180.000000000000000 + 10000.000000000000000 + + + + + + + + 0 + 0 + + + + -10000.000000000000000 + + + 10000.000000000000000 + + + + + + + + 0 + 0 + + + + -10000.000000000000000 + + + 10000.000000000000000 + + + + + + + Head Z - - - - Head center + + + + Head Y + + + + + + + Calibrate - - - - - Calibrate - - - - - - - TX - - - - - - - - 0 - 0 - - - - -10000.000000000000000 - - - 10000.000000000000000 - - - - - - - - 0 - 0 - - - - -10000.000000000000000 - - - 10000.000000000000000 - - - - - - - - 0 - 0 - - - - -10000.000000000000000 - - - 10000.000000000000000 - - - - - - - TZ - - - - - - - TY - - - - - - - - - 0 - 0 - - - - <html><head/><body><p>The ARUCO Library has been developed by the Ava group of the Univeristy of Cordoba, Spain</p><p>Rafael Muñoz Salinas &lt;<a href="mailto:rmsalinas@uco.es"><span style=" text-decoration: underline; color:#0057ae;">rmsalinas@uco.es</span></a>&gt;</p><p>&lt;<a href="https://github.com/rmsalinas/aruco"><span style=" text-decoration: underline; color:#0057ae;">https://github.com/rmsalinas/aruco</span></a>&gt;</p></body></html> - - - Qt::RichText - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - 4 - - - true - - - Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - buttonBox - diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index 1787ef2b..31aa2372 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -198,7 +198,6 @@ void Tracker::run() int cur_fps = 0; int last_fps = 0; cv::Point2f last_centroid; - bool first = true; while (!stop) { @@ -284,23 +283,19 @@ void Tracker::run() const auto& m = markers.at(0); const float size = 40; - const double p = s.marker_pitch; - const double sq = sin(p * HT_PI / 180); - const double cq = cos(p * HT_PI / 180); - cv::Mat obj_points(4,3,CV_32FC1); obj_points.at(1,0)=-size + s.headpos_x; - obj_points.at(1,1)=-size * cq + s.headpos_y; - obj_points.at(1,2)=-size * sq + s.headpos_z; + obj_points.at(1,1)=-size + s.headpos_y; + obj_points.at(1,2)=-size + s.headpos_z; obj_points.at(2,0)=size + s.headpos_x; - obj_points.at(2,1)=-size * cq + s.headpos_y; - obj_points.at(2,2)=-size * sq + s.headpos_z; + obj_points.at(2,1)=-size + s.headpos_y; + obj_points.at(2,2)=-size + s.headpos_z; obj_points.at(3,0)=size + s.headpos_x; - obj_points.at(3,1)=size * cq + s.headpos_y; - obj_points.at(3,2)=size * sq + s.headpos_z; + obj_points.at(3,1)=size + s.headpos_y; + obj_points.at(3,2)=size + s.headpos_z; obj_points.at(0,0)=-size + s.headpos_x; - obj_points.at(0,1)=size * cq + s.headpos_y; - obj_points.at(0,2)=size * sq + s.headpos_z; + obj_points.at(0,1)=size + s.headpos_y; + obj_points.at(0,2)=size + s.headpos_z; last_roi = cv::Rect(65535, 65535, 0, 0); @@ -325,8 +320,7 @@ void Tracker::run() last_roi.height = std::min(grayscale.rows - last_roi.y, last_roi.height); } - cv::solvePnP(obj_points, m, intrinsics, dist_coeffs, rvec, tvec, !first, cv::ITERATIVE); - first = false; + cv::solvePnP(obj_points, m, intrinsics, dist_coeffs, rvec, tvec, false, cv::ITERATIVE); cv::Mat rotation_matrix = cv::Mat::zeros(3, 3, CV_64FC1); cv::Mat junk1(3, 3, CV_64FC1), junk2(3, 3, CV_64FC1); cv::Rodrigues(rvec, rotation_matrix); @@ -334,12 +328,6 @@ void Tracker::run() { cv::Vec3d euler = cv::RQDecomp3x3(rotation_matrix, junk1, junk2); - if (fabs(euler[0]) + fabs(s.marker_pitch) > 60) - { - first = true; - qDebug() << "reset levmarq due to pitch breakage"; - } - QMutexLocker lck(&mtx); for (int i = 0; i < 3; i++) @@ -366,10 +354,7 @@ void Tracker::run() last_centroid = repr2[0]; } else - { last_roi = cv::Rect(65535, 65535, 0, 0); - first = true; - } if (frame.rows > 0) videoWidget->update_image(frame); @@ -454,7 +439,6 @@ TrackerControls::TrackerControls() tie_setting(s.headpos_y, ui.cy); tie_setting(s.headpos_z, ui.cz); tie_setting(s.red_only, ui.red_only); - tie_setting(s.marker_pitch, ui.marker_pitch); connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); connect(ui.btn_calibrate, SIGNAL(clicked()), this, SLOT(toggleCalibrate())); diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h index 9ac57417..c53a49a4 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h @@ -28,7 +28,6 @@ struct settings { value fov, headpos_x, headpos_y, headpos_z; value camera_index, force_fps, resolution; value red_only; - value marker_pitch; settings() : b(bundle("aruco-tracker")), fov(b, "field-of-view", 56), @@ -38,8 +37,7 @@ struct settings { camera_index(b, "camera-index", 0), force_fps(b, "force-fps", 0), resolution(b, "force-resolution", 0), - red_only(b, "red-only", false), - marker_pitch(b, "marker-pitch", 0) + red_only(b, "red-only", false) {} }; -- cgit v1.2.3 From 2de1c44a994fb72142ef020546efcd22ac8c6a83 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 12 Oct 2014 16:10:23 +0200 Subject: aruco cleanup, experimental contrast fix --- ftnoir_tracker_aruco/ar_video_widget.cpp | 12 ++ ftnoir_tracker_aruco/ar_video_widget.h | 22 +-- ftnoir_tracker_aruco/aruco-trackercontrols.ui | 91 ++++++------ ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 198 ++++++++++++++++---------- ftnoir_tracker_aruco/ftnoir_tracker_aruco.h | 30 ++-- ftnoir_tracker_aruco/trans_calib.cpp | 4 +- ftnoir_tracker_aruco/trans_calib.h | 2 +- 7 files changed, 209 insertions(+), 150 deletions(-) (limited to 'ftnoir_tracker_aruco/aruco-trackercontrols.ui') diff --git a/ftnoir_tracker_aruco/ar_video_widget.cpp b/ftnoir_tracker_aruco/ar_video_widget.cpp index 9a089213..61a611ea 100644 --- a/ftnoir_tracker_aruco/ar_video_widget.cpp +++ b/ftnoir_tracker_aruco/ar_video_widget.cpp @@ -40,3 +40,15 @@ void ArucoVideoWidget::update_and_repaint() texture = qframe2; update(); } + +void ArucoVideoWidget::paintEvent(QPaintEvent* e) +{ + QMutexLocker foo(&mtx); + QPainter(this).drawImage(e->rect(), texture); +} + +ArucoVideoWidget::ArucoVideoWidget(QWidget* parent): QWidget(parent) +{ + connect(&timer, SIGNAL(timeout()), this, SLOT(update_and_repaint())); + timer.start(60); +} \ No newline at end of file diff --git a/ftnoir_tracker_aruco/ar_video_widget.h b/ftnoir_tracker_aruco/ar_video_widget.h index e2cf4d9f..820ba7d0 100644 --- a/ftnoir_tracker_aruco/ar_video_widget.h +++ b/ftnoir_tracker_aruco/ar_video_widget.h @@ -22,26 +22,18 @@ class ArucoVideoWidget : public QWidget { Q_OBJECT - -public: - ArucoVideoWidget(QWidget *parent) : QWidget(parent) { - connect(&timer, SIGNAL(timeout()), this, SLOT(update_and_repaint())); - timer.start(60); - } - void update_image(const cv::Mat& frame); -protected slots: - void paintEvent( QPaintEvent* e ) { - QMutexLocker foo(&mtx); - QPainter painter(this); - painter.drawImage(e->rect(), texture); - } - void update_and_repaint(); - + private: QMutex mtx; QImage texture; QTimer timer; cv::Mat _frame; +private slots: + void update_and_repaint(); +public: + ArucoVideoWidget(QWidget *parent); + void update_image(const cv::Mat& frame); + void paintEvent( QPaintEvent*) override; }; #endif // VIDEOWIDGET_H diff --git a/ftnoir_tracker_aruco/aruco-trackercontrols.ui b/ftnoir_tracker_aruco/aruco-trackercontrols.ui index 240ef5f8..1898d15b 100644 --- a/ftnoir_tracker_aruco/aruco-trackercontrols.ui +++ b/ftnoir_tracker_aruco/aruco-trackercontrols.ui @@ -9,7 +9,7 @@ 0 0 - 560 + 562 214 @@ -40,35 +40,6 @@ - - - - - 0 - 0 - - - - - - - 35.000000000000000 - - - 180.000000000000000 - - - 52.000000000000000 - - - - - - - Frames per second - - - @@ -104,10 +75,39 @@ - - + + - Camera name + Resolution + + + + + + + + 0 + 0 + + + + + + + 35.000000000000000 + + + 180.000000000000000 + + + 52.000000000000000 + + + + + + + Frames per second @@ -121,10 +121,10 @@ - - + + - Resolution + Camera name @@ -159,16 +159,25 @@ - + - Red channel only + Sun glare removal - - - Mileage may vary + + + 100 + + + 10 + + + 20 + + + Qt::Horizontal diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index 31aa2372..0974f0f0 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include "./include/markerdetector.h" #include "ftnoir_tracker_aruco.h" @@ -135,7 +136,7 @@ void Tracker::StartTracker(QFrame* videoframe) #define HT_PI 3.1415926535 -void Tracker::getRT(cv::Matx33f& r_, cv::Vec3f& t_) +void Tracker::getRT(cv::Matx33d& r_, cv::Vec3d& t_) { QMutexLocker l(&mtx); @@ -183,10 +184,6 @@ void Tracker::run() cv::Rect last_roi(65535, 65535, 0, 0); - cv::Mat color, color_, grayscale, rvec, tvec; - - const double stateful_coeff = 0.88; - if (!camera.isOpened()) { fprintf(stderr, "aruco tracker: can't open camera\n"); @@ -201,19 +198,46 @@ void Tracker::run() while (!stop) { - if (!camera.read(color_)) + cv::Mat color; + if (!camera.read(color)) continue; auto tm = cv::getTickCount(); - color_.copyTo(color); - if (s.red_only) + + const double c = s.desaturate * 16. / 100.; + + if (std::abs(c) > 1e-3) { - cv::Mat channel[3]; - cv::split(color, channel); - grayscale = channel[2]; - } else - cv::cvtColor(color, grayscale, cv::COLOR_BGR2GRAY); - - gain.tick(camera, grayscale); + const int w=color.cols, h=color.rows; + + cv::Mat hsv; + cv::cvtColor(color, hsv, cv::COLOR_BGR2HSV); + vector channels; + cv::split(hsv, channels); + cv::Mat sat = channels[1]; + cv::Mat val = channels[2]; + + struct ops { + static double sig(double x) + { + double x_ = -6 + x * 2 * 6; + return 1./(1.+exp(-x_)); + } + }; + + for (int i = 0; i < h; i++) + for (int j = 0; j < w; j++) + { + const double sat_ij = sat.at(i, j)/255.; + val.at(i, j) *= std::max(0., 1. - c*ops::sig(sat_ij)); + } + + channels[1] = sat; + channels[2] = val; + cv::merge(channels, hsv); + cv::cvtColor(hsv, color, cv::COLOR_HSV2BGR); + } + cv::Mat grayscale; + cv::cvtColor(color, grayscale, cv::COLOR_BGR2GRAY); const int scale = frame.cols > 480 ? 2 : 1; detector.setThresholdParams(scale > 1 ? 11 : 7, 4); @@ -232,27 +256,33 @@ void Tracker::run() const double size_min = 0.04; const double size_max = 0.38; - - if (last_roi.width > 0 && - (detector.detect(grayscale(last_roi), markers, cv::Mat(), cv::Mat(), -1, false), - markers.size() == 1 && markers[0].size() == 4)) + + bool roi_valid = false; + + if (last_roi.width > 0 && last_roi.height) { detector.setMinMaxSize(std::max(0.01, size_min * grayscale.cols / last_roi.width), std::min(1.0, size_max * grayscale.cols / last_roi.width)); - auto& m = markers.at(0); - for (int i = 0; i < 4; i++) + if (detector.detect(grayscale(last_roi), markers, cv::Mat(), cv::Mat(), -1, false), + markers.size() == 1 && markers[0].size() == 4) { - auto& p = m.at(i); - p.x += last_roi.x; - p.y += last_roi.y; + auto& m = markers.at(0); + for (int i = 0; i < 4; i++) + { + auto& p = m.at(i); + p.x += last_roi.x; + p.y += last_roi.y; + } + roi_valid = true; } } - else + + if (!roi_valid) { detector.setMinMaxSize(size_min, size_max); detector.detect(grayscale, markers, cv::Mat(), cv::Mat(), -1, false); } - + if (markers.size() == 1 && markers[0].size() == 4) { const auto& m = markers.at(0); for (int i = 0; i < 4; i++) @@ -275,70 +305,89 @@ void Tracker::run() frame = color.clone(); ::sprintf(buf, "Hz: %d", last_fps); - cv::putText(frame, buf, cv::Point(10, 32), cv::FONT_HERSHEY_PLAIN, scale, cv::Scalar(0, 255, 0), scale); + cv::putText(frame, buf, cv::Point(10, 32), cv::FONT_HERSHEY_PLAIN, scale, cv::Scalar(0, 255, 0), 1); ::sprintf(buf, "Jiffies: %ld", (long) (10000 * (time - tm) / freq)); - cv::putText(frame, buf, cv::Point(10, 54), cv::FONT_HERSHEY_PLAIN, scale, cv::Scalar(80, 255, 0), scale); + cv::putText(frame, buf, cv::Point(10, 54), cv::FONT_HERSHEY_PLAIN, scale, cv::Scalar(80, 255, 0), 1); if (markers.size() == 1 && markers[0].size() == 4) { const auto& m = markers.at(0); const float size = 40; cv::Mat obj_points(4,3,CV_32FC1); - obj_points.at(1,0)=-size + s.headpos_x; - obj_points.at(1,1)=-size + s.headpos_y; - obj_points.at(1,2)=-size + s.headpos_z; - obj_points.at(2,0)=size + s.headpos_x; - obj_points.at(2,1)=-size + s.headpos_y; - obj_points.at(2,2)=-size + s.headpos_z; - obj_points.at(3,0)=size + s.headpos_x; - obj_points.at(3,1)=size + s.headpos_y; - obj_points.at(3,2)=size + s.headpos_z; - obj_points.at(0,0)=-size + s.headpos_x; - obj_points.at(0,1)=size + s.headpos_y; - obj_points.at(0,2)=size + s.headpos_z; - - last_roi = cv::Rect(65535, 65535, 0, 0); - + const int x1=1, x2=2, x3=3, x4=0; + obj_points.at(x1,0)=-size + s.headpos_x; + obj_points.at(x1,1)=-size + s.headpos_y; + obj_points.at(x1,2)= 0 + s.headpos_z; + + obj_points.at(x2,0)=size + s.headpos_x; + obj_points.at(x2,1)=-size + s.headpos_y; + obj_points.at(x2,2)= 0 + s.headpos_z; + + obj_points.at(x3,0)=size + s.headpos_x; + obj_points.at(x3,1)=size + s.headpos_y; + obj_points.at(x3,2)= 0 + s.headpos_z; + + obj_points.at(x4,0)= -size + s.headpos_x; + obj_points.at(x4,1)= size + s.headpos_y; + obj_points.at(x4,2)= 0 + s.headpos_z; + + cv::Vec3d rvec, tvec; + + cv::solvePnP(obj_points, m, intrinsics, dist_coeffs, rvec, tvec, false, cv::ITERATIVE); + + std::vector roi_projection(4); + cv::Mat roi_points = obj_points * c_search_window; + cv::projectPoints(roi_points, rvec, tvec, intrinsics, dist_coeffs, roi_projection); + + last_roi = cv::Rect(color.cols-1, color.rows-1, 0, 0); + for (int i = 0; i < 4; i++) { - auto foo = m.at(i); - last_roi.x = std::min(foo.x, last_roi.x); - last_roi.y = std::min(foo.y, last_roi.y); - last_roi.width = std::max(foo.x, last_roi.width); - last_roi.height = std::max(foo.y, last_roi.height); - } - { - last_roi.width -= last_roi.x; - last_roi.height -= last_roi.y; - last_roi.x -= last_roi.width * stateful_coeff; - last_roi.y -= last_roi.height * stateful_coeff; - last_roi.width *= stateful_coeff * 3; - last_roi.height *= stateful_coeff * 3; - last_roi.x = std::max(0, last_roi.x); - last_roi.y = std::max(0, last_roi.y); - last_roi.width = std::min(grayscale.cols - last_roi.x, last_roi.width); - last_roi.height = std::min(grayscale.rows - last_roi.y, last_roi.height); + auto proj = roi_projection[i]; + int min_x = std::min(proj.x, last_roi.x), + min_y = std::min(proj.y, last_roi.y); + + int max_x = std::max(proj.x, last_roi.width), + max_y = std::max(proj.y, last_roi.height); + + last_roi.x = min_x; + last_roi.y = min_y; + + last_roi.width = max_x; + last_roi.height = max_y; } - - cv::solvePnP(obj_points, m, intrinsics, dist_coeffs, rvec, tvec, false, cv::ITERATIVE); - cv::Mat rotation_matrix = cv::Mat::zeros(3, 3, CV_64FC1); - cv::Mat junk1(3, 3, CV_64FC1), junk2(3, 3, CV_64FC1); - cv::Rodrigues(rvec, rotation_matrix); + + if (last_roi.x < 0) + last_roi.x = 0; + if (last_roi.y < 0) + last_roi.y = 0; + + if (last_roi.width+1 > color.cols) + last_roi.width = color.cols-1; + + if (last_roi.height+1 > color.rows) + last_roi.height = color.rows-1; + + last_roi.width -= last_roi.x; + last_roi.height -= last_roi.y; + + auto rmat = cv::Matx33d::zeros(); + cv::Matx33d m_r(3, 3, CV_64FC1), m_q(3, 3, CV_64FC1); + cv::Rodrigues(rvec, rmat); { - cv::Vec3d euler = cv::RQDecomp3x3(rotation_matrix, junk1, junk2); + cv::Vec3d euler = cv::RQDecomp3x3(rmat, m_r, m_q); QMutexLocker lck(&mtx); for (int i = 0; i < 3; i++) - pose[i] = tvec.at(i); - + pose[i] = tvec(i); pose[Yaw] = euler[1]; pose[Pitch] = -euler[0]; pose[Roll] = euler[2]; - rotation_matrix.convertTo(r, CV_32FC1); - tvec.convertTo(t, CV_32FC1); + r = rmat; + t = tvec; } std::vector repr2; @@ -350,6 +399,9 @@ void Tracker::run() auto s = cv::Scalar(255, 0, 255); cv::circle(frame, repr2.at(0), 4, s, -1); } + + if (roi_valid) + cv::rectangle(frame, last_roi, cv::Scalar(255, 0, 255), 1); last_centroid = repr2[0]; } @@ -438,7 +490,7 @@ TrackerControls::TrackerControls() tie_setting(s.headpos_x, ui.cx); tie_setting(s.headpos_y, ui.cy); tie_setting(s.headpos_z, ui.cz); - tie_setting(s.red_only, ui.red_only); + tie_setting(s.desaturate, ui.desaturate_slider); connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); connect(ui.btn_calibrate, SIGNAL(clicked()), this, SLOT(toggleCalibrate())); @@ -467,8 +519,8 @@ void TrackerControls::update_tracker_calibration() { if (calib_timer.isActive() && tracker) { - cv::Matx33f r; - cv::Vec3f t; + cv::Matx33d r; + cv::Vec3d t; tracker->getRT(r, t); calibrator.update(r, t); auto pos = calibrator.get_estimate() * .1; diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h index c53a49a4..03fff844 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h @@ -5,8 +5,7 @@ * copyright notice and this permission notice appear in all copies. */ -#ifndef FTNOIR_TRACKER_HT_H -#define FTNOIR_TRACKER_HT_H +#pragma once #include "ui_aruco-trackercontrols.h" #include "ar_video_widget.h" @@ -19,7 +18,9 @@ #include "facetracknoir/options.h" #include "ftnoir_tracker_aruco/trans_calib.h" #include "facetracknoir/plugin-api.hpp" -#include "facetracknoir/gain-control.hpp" + +#include +#include using namespace options; @@ -27,7 +28,7 @@ struct settings { pbundle b; value fov, headpos_x, headpos_y, headpos_z; value camera_index, force_fps, resolution; - value red_only; + value desaturate; settings() : b(bundle("aruco-tracker")), fov(b, "field-of-view", 56), @@ -37,13 +38,14 @@ struct settings { camera_index(b, "camera-index", 0), force_fps(b, "force-fps", 0), resolution(b, "force-resolution", 0), - red_only(b, "red-only", false) + desaturate(b, "desaturate", 0) {} }; class Tracker : protected QThread, public ITracker { Q_OBJECT + static constexpr double c_search_window = 2.9; public: Tracker(); ~Tracker() override; @@ -51,7 +53,7 @@ public: void GetHeadPoseData(double *data); void run(); void reload() { s.b->reload(); } - void getRT(cv::Matx33f& r, cv::Vec3f& t); + void getRT(cv::Matx33d &r, cv::Vec3d &t); private: QMutex mtx; volatile bool stop; @@ -61,9 +63,8 @@ private: double pose[6]; cv::Mat frame; cv::VideoCapture camera; - cv::Matx33f r; - cv::Vec3f t; - Gain gain; + cv::Matx33d r; + cv::Vec3d t; }; class TrackerControls : public QWidget, public ITrackerDialog @@ -71,12 +72,8 @@ class TrackerControls : public QWidget, public ITrackerDialog Q_OBJECT public: TrackerControls(); - void registerTracker(ITracker * x) { - tracker = dynamic_cast(x); - } - void unRegisterTracker() { - tracker = nullptr; - } + void registerTracker(ITracker * x) { tracker = dynamic_cast(x); } + void unRegisterTracker() { tracker = nullptr; } private: Ui::Form ui; Tracker* tracker; @@ -90,6 +87,3 @@ private slots: void cleanupCalib(); void update_tracker_calibration(); }; - -#endif - diff --git a/ftnoir_tracker_aruco/trans_calib.cpp b/ftnoir_tracker_aruco/trans_calib.cpp index b1f956b4..369de449 100644 --- a/ftnoir_tracker_aruco/trans_calib.cpp +++ b/ftnoir_tracker_aruco/trans_calib.cpp @@ -21,9 +21,9 @@ void TranslationCalibrator::reset() y = Vec6f(0,0,0, 0,0,0); } -void TranslationCalibrator::update(const Matx33f& R_CM_k, const Vec3f& t_CM_k) +void TranslationCalibrator::update(const Matx33d& R_CM_k, const Vec3d& t_CM_k) { - Matx H_k_T = Matx::zeros(); + Matx H_k_T = Matx::zeros(); for (int i=0; i<3; ++i) { for (int j=0; j<3; ++j) { H_k_T(i,j) = R_CM_k(j,i); diff --git a/ftnoir_tracker_aruco/trans_calib.h b/ftnoir_tracker_aruco/trans_calib.h index c2c02b38..5a2d7c0f 100644 --- a/ftnoir_tracker_aruco/trans_calib.h +++ b/ftnoir_tracker_aruco/trans_calib.h @@ -26,7 +26,7 @@ public: void reset(); // update the current estimate - void update(const cv::Matx33f& R_CM_k, const cv::Vec3f& t_CM_k); + void update(const cv::Matx33d& R_CM_k, const cv::Vec3d& t_CM_k); // get the current estimate for t_MH cv::Vec3f get_estimate(); -- cgit v1.2.3 From 14f59d9fe5f1926a8562efc8a51a785365bc0131 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 14 Oct 2014 23:02:15 +0200 Subject: aruco: fix fixating on the prev marker location --- ftnoir_tracker_aruco/aruco-trackercontrols.ui | 117 +++++++++++--------------- ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 79 +++++++---------- ftnoir_tracker_aruco/ftnoir_tracker_aruco.h | 6 +- 3 files changed, 78 insertions(+), 124 deletions(-) (limited to 'ftnoir_tracker_aruco/aruco-trackercontrols.ui') diff --git a/ftnoir_tracker_aruco/aruco-trackercontrols.ui b/ftnoir_tracker_aruco/aruco-trackercontrols.ui index 1898d15b..099dec02 100644 --- a/ftnoir_tracker_aruco/aruco-trackercontrols.ui +++ b/ftnoir_tracker_aruco/aruco-trackercontrols.ui @@ -10,7 +10,7 @@ 0 0 562 - 214 + 178 @@ -33,6 +33,42 @@ + + + + + 0 + 0 + + + + + + + 35.000000000000000 + + + 180.000000000000000 + + + 52.000000000000000 + + + + + + + Frames per second + + + + + + + Resolution + + + @@ -75,59 +111,6 @@ - - - - Resolution - - - - - - - - 0 - 0 - - - - - - - 35.000000000000000 - - - 180.000000000000000 - - - 52.000000000000000 - - - - - - - Frames per second - - - - - - - - 0 - 0 - - - - - - - - Camera name - - - @@ -158,26 +141,20 @@ - - + + - Sun glare removal + Camera name - - - - 100 - - - 10 - - - 20 - - - Qt::Horizontal + + + + + 0 + 0 + diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index 0974f0f0..fd8a8ce1 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -194,7 +194,6 @@ void Tracker::run() auto last_time = cv::getTickCount(); int cur_fps = 0; int last_fps = 0; - cv::Point2f last_centroid; while (!stop) { @@ -203,42 +202,9 @@ void Tracker::run() continue; auto tm = cv::getTickCount(); - const double c = s.desaturate * 16. / 100.; - - if (std::abs(c) > 1e-3) - { - const int w=color.cols, h=color.rows; - - cv::Mat hsv; - cv::cvtColor(color, hsv, cv::COLOR_BGR2HSV); - vector channels; - cv::split(hsv, channels); - cv::Mat sat = channels[1]; - cv::Mat val = channels[2]; - - struct ops { - static double sig(double x) - { - double x_ = -6 + x * 2 * 6; - return 1./(1.+exp(-x_)); - } - }; - - for (int i = 0; i < h; i++) - for (int j = 0; j < w; j++) - { - const double sat_ij = sat.at(i, j)/255.; - val.at(i, j) *= std::max(0., 1. - c*ops::sig(sat_ij)); - } - - channels[1] = sat; - channels[2] = val; - cv::merge(channels, hsv); - cv::cvtColor(hsv, color, cv::COLOR_HSV2BGR); - } cv::Mat grayscale; cv::cvtColor(color, grayscale, cv::COLOR_BGR2GRAY); - + const int scale = frame.cols > 480 ? 2 : 1; detector.setThresholdParams(scale > 1 ? 11 : 7, 4); @@ -333,9 +299,35 @@ void Tracker::run() cv::Vec3d rvec, tvec; - cv::solvePnP(obj_points, m, intrinsics, dist_coeffs, rvec, tvec, false, cv::ITERATIVE); + cv::solvePnP(obj_points, m, intrinsics, dist_coeffs, rvec, tvec, false, cv::P3P); std::vector roi_projection(4); + + { + std::vector repr2; + std::vector centroid; + centroid.push_back(cv::Point3f(0, 0, 0)); + cv::projectPoints(centroid, rvec, tvec, intrinsics, dist_coeffs, repr2); + + { + auto s = cv::Scalar(255, 0, 255); + cv::circle(frame, repr2.at(0), 4, s, -1); + } + } + + for (int i = 0; i < 4; i++) + { + obj_points.at(i, 0) -= s.headpos_x; + obj_points.at(i, 1) -= s.headpos_y; + obj_points.at(i, 2) -= s.headpos_z; + } + + { + cv::Mat rvec_, tvec_; + cv::solvePnP(obj_points, m, intrinsics, dist_coeffs, rvec_, tvec_, false, cv::P3P); + tvec = tvec_; + } + cv::Mat roi_points = obj_points * c_search_window; cv::projectPoints(roi_points, rvec, tvec, intrinsics, dist_coeffs, roi_projection); @@ -389,21 +381,9 @@ void Tracker::run() r = rmat; t = tvec; } - - std::vector repr2; - std::vector centroid; - centroid.push_back(cv::Point3f(0, 0, 0)); - cv::projectPoints(centroid, rvec, tvec, intrinsics, dist_coeffs, repr2); - - { - auto s = cv::Scalar(255, 0, 255); - cv::circle(frame, repr2.at(0), 4, s, -1); - } if (roi_valid) cv::rectangle(frame, last_roi, cv::Scalar(255, 0, 255), 1); - - last_centroid = repr2[0]; } else last_roi = cv::Rect(65535, 65535, 0, 0); @@ -490,7 +470,6 @@ TrackerControls::TrackerControls() tie_setting(s.headpos_x, ui.cx); tie_setting(s.headpos_y, ui.cy); tie_setting(s.headpos_z, ui.cz); - tie_setting(s.desaturate, ui.desaturate_slider); connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); connect(ui.btn_calibrate, SIGNAL(clicked()), this, SLOT(toggleCalibrate())); @@ -540,6 +519,6 @@ void TrackerControls::doOK() void TrackerControls::doCancel() { - s.b->revert(); + s.b->reload(); this->close(); } diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h index 03fff844..3d37dacd 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h @@ -28,7 +28,6 @@ struct settings { pbundle b; value fov, headpos_x, headpos_y, headpos_z; value camera_index, force_fps, resolution; - value desaturate; settings() : b(bundle("aruco-tracker")), fov(b, "field-of-view", 56), @@ -37,15 +36,14 @@ struct settings { headpos_z(b, "headpos-z", 0), camera_index(b, "camera-index", 0), force_fps(b, "force-fps", 0), - resolution(b, "force-resolution", 0), - desaturate(b, "desaturate", 0) + resolution(b, "force-resolution", 0) {} }; class Tracker : protected QThread, public ITracker { Q_OBJECT - static constexpr double c_search_window = 2.9; + static constexpr double c_search_window = 2.2; public: Tracker(); ~Tracker() override; -- cgit v1.2.3