diff options
Diffstat (limited to 'tracker-pt')
-rw-r--r-- | tracker-pt/ftnoir_tracker_pt_dialog.cpp | 15 | ||||
-rw-r--r-- | tracker-pt/ftnoir_tracker_pt_dialog.h | 2 | ||||
-rw-r--r-- | tracker-pt/ftnoir_tracker_pt_settings.h | 21 |
3 files changed, 38 insertions, 0 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt_dialog.cpp b/tracker-pt/ftnoir_tracker_pt_dialog.cpp index 2c3cbd07..35a029df 100644 --- a/tracker-pt/ftnoir_tracker_pt_dialog.cpp +++ b/tracker-pt/ftnoir_tracker_pt_dialog.cpp @@ -131,6 +131,8 @@ void TrackerDialog_PT::startstop_trans_calib(bool start) if (start) { + c_calib = {}; + qDebug() << "pt: starting translation calibration"; calib_timer.start(); trans_calib.reset(); @@ -142,6 +144,9 @@ void TrackerDialog_PT::startstop_trans_calib(bool start) } else { + // XXX reenable after build + // (void) c_calib.get_coefficients(); + calib_timer.stop(); qDebug() << "pt: stopping translation calibration"; { @@ -237,8 +242,18 @@ void TrackerDialog_PT::trans_calib_step() if (tracker) { + // XXX reenable after build + if (false) + { + + Mat<double, 6, 1> m; + tracker->data(m); + c_calib.input(m); + } + Affine X_CM = tracker->pose(); trans_calib.update(X_CM.R, X_CM.t); + } else startstop_trans_calib(false); diff --git a/tracker-pt/ftnoir_tracker_pt_dialog.h b/tracker-pt/ftnoir_tracker_pt_dialog.h index c1c25fb0..bae03adc 100644 --- a/tracker-pt/ftnoir_tracker_pt_dialog.h +++ b/tracker-pt/ftnoir_tracker_pt_dialog.h @@ -14,6 +14,7 @@ #include "ui_FTNoIR_PT_Controls.h" #include "cv/translation-calibrator.hpp" #include "cv/video-widget.hpp" +#include "compat/correlation-calibrator.hpp" #include <QTimer> #include <QMutex> @@ -44,6 +45,7 @@ private: Tracker_PT* tracker; QTimer timer, calib_timer; TranslationCalibrator trans_calib; + correlation_calibrator c_calib; QMutex calibrator_mutex; Ui::UICPTClientControls ui; diff --git a/tracker-pt/ftnoir_tracker_pt_settings.h b/tracker-pt/ftnoir_tracker_pt_settings.h index 71b98fc2..7fa560d2 100644 --- a/tracker-pt/ftnoir_tracker_pt_settings.h +++ b/tracker-pt/ftnoir_tracker_pt_settings.h @@ -46,6 +46,27 @@ struct settings_pt : opts value<slider_value> threshold_slider; +#define XSTR(x) #x + +#define M(name, val) \ + { b, "interconnect-m" XSTR(name), (val) } +#define A(name) M(name, 0), +#define B(name) M(name, 1), + + value<double> interconnect[6][6] { + { B(00) A(01) A(02) A(03) A(04) A(05) }, + { A(10) B(11) A(12) A(13) A(14) A(15) }, + { A(20) A(21) B(22) A(23) A(24) A(25) }, + { A(30) A(31) A(32) B(33) A(34) A(35) }, + { A(40) A(41) A(42) A(43) B(44) A(45) }, + { A(50) A(51) A(52) A(53) A(54) B(55) }, + }; + +#undef M +#undef A +#undef B +#undef XSTR + settings_pt() : opts("tracker-pt"), camera_name(b, "camera-name", ""), |