From 77a469de95a498a4860b7da72b38508d40c2bede Mon Sep 17 00:00:00 2001 From: Stéphane Lenclud Date: Sun, 21 Apr 2019 13:36:18 +0200 Subject: Easy Tracker: Settings clean-up and rearrangement. --- tracker-easy/lang/nl_NL.ts | 44 +--- tracker-easy/lang/ru_RU.ts | 44 +--- tracker-easy/lang/stub.ts | 44 +--- tracker-easy/lang/zh_CN.ts | 44 +--- tracker-easy/settings.h | 2 - tracker-easy/tracker-easy-dialog.cpp | 33 +-- tracker-easy/tracker-easy-dialog.h | 1 - tracker-easy/tracker-easy-settings.ui | 381 +++++++++++++--------------------- 8 files changed, 174 insertions(+), 419 deletions(-) diff --git a/tracker-easy/lang/nl_NL.ts b/tracker-easy/lang/nl_NL.ts index 21ea306e..22a99106 100644 --- a/tracker-easy/lang/nl_NL.ts +++ b/tracker-easy/lang/nl_NL.ts @@ -3,14 +3,6 @@ EasyTracker::Dialog - - Brightness %1/255 - - - - LED radius %1 pixels - - %1 yaw samples. Yaw more to %2 samples for stable calibration. @@ -53,10 +45,6 @@ Camera - - Camera settings - - ° @@ -109,34 +97,14 @@ Camera settings (when available) - - Point extraction - - Max size - - Threshold - - Min size - - Intensity threshold for point extraction - - - - Automatic threshold - - - - Enable, slider sets point size - - Maximum point diameter @@ -145,10 +113,6 @@ Minimum point diameter - - Value - - Model @@ -282,5 +246,13 @@ Don't roll or change position. AP3P + + Tracker + + + + Settings + + diff --git a/tracker-easy/lang/ru_RU.ts b/tracker-easy/lang/ru_RU.ts index bc725e23..d45c89d1 100644 --- a/tracker-easy/lang/ru_RU.ts +++ b/tracker-easy/lang/ru_RU.ts @@ -3,14 +3,6 @@ EasyTracker::Dialog - - Brightness %1/255 - - - - LED radius %1 pixels - - %1 yaw samples. Yaw more to %2 samples for stable calibration. По оси YAW выполнено: %1 замер(а/ов). Для стабильного результата необходимо не меньше %2 @@ -53,10 +45,6 @@ Camera Камера - - Camera settings - Настройка камеры - ° @@ -109,34 +97,14 @@ Camera settings (when available) Параметры камеры (если доступно) - - Point extraction - Извлечение точек - Max size Макс.размер - - Threshold - Порог - Min size Мин.размер - - Intensity threshold for point extraction - Порог интенсивности для извлечения точки - - - Automatic threshold - Автоматич. порог - - - Enable, slider sets point size - Полузнок устанавливает размер точек - Maximum point diameter @@ -145,10 +113,6 @@ Minimum point diameter - - Value - - Model Модель @@ -287,5 +251,13 @@ ROLL или X/Y-смещения. AP3P + + Tracker + + + + Settings + + diff --git a/tracker-easy/lang/stub.ts b/tracker-easy/lang/stub.ts index 75e29070..1b58a8f4 100644 --- a/tracker-easy/lang/stub.ts +++ b/tracker-easy/lang/stub.ts @@ -3,14 +3,6 @@ EasyTracker::Dialog - - Brightness %1/255 - - - - LED radius %1 pixels - - %1 yaw samples. Yaw more to %2 samples for stable calibration. @@ -53,10 +45,6 @@ Camera - - Camera settings - - ° @@ -109,34 +97,14 @@ Camera settings (when available) - - Point extraction - - Max size - - Threshold - - Min size - - Intensity threshold for point extraction - - - - Automatic threshold - - - - Enable, slider sets point size - - Maximum point diameter @@ -145,10 +113,6 @@ Minimum point diameter - - Value - - Model @@ -282,5 +246,13 @@ Don't roll or change position. AP3P + + Tracker + + + + Settings + + diff --git a/tracker-easy/lang/zh_CN.ts b/tracker-easy/lang/zh_CN.ts index 68172059..d524aaed 100644 --- a/tracker-easy/lang/zh_CN.ts +++ b/tracker-easy/lang/zh_CN.ts @@ -3,14 +3,6 @@ EasyTracker::Dialog - - Brightness %1/255 - 亮度 %1/255 - - - LED radius %1 pixels - 光源半径 %1 像素 - %1 yaw samples. Yaw more to %2 samples for stable calibration. @@ -53,10 +45,6 @@ Camera 摄像头 - - Camera settings - 摄像头设置 - ° @@ -109,34 +97,14 @@ Camera settings (when available) 摄像头设置 (连接时) - - Point extraction - 跟踪点解析 - Max size 最大 - - Threshold - 大小门限值 - Min size 最小 - - Intensity threshold for point extraction - 点密度 - - - Automatic threshold - 自动门限值 - - - Enable, slider sets point size - 激活,滑动,设置跟踪点大小 - Maximum point diameter 最大点直径 @@ -225,10 +193,6 @@ Camera Info: 设备信息: - - Value - - Use only yaw and pitch while calibrating. Don't roll or change position. @@ -282,5 +246,13 @@ Don't roll or change position. AP3P + + Tracker + + + + Settings + + diff --git a/tracker-easy/settings.h b/tracker-easy/settings.h index 4d043e6a..b4c14967 100644 --- a/tracker-easy/settings.h +++ b/tracker-easy/settings.h @@ -48,10 +48,8 @@ namespace EasyTracker { value debug{ b, "debug", false }; - value auto_threshold{ b, "automatic-threshold", true }; value PnpSolver{ b, "pnp-solver", cv::SOLVEPNP_P3P }; - value threshold_slider{ b, "threshold-slider", { 128, 0, 255 } }; explicit Settings(const QString& name) : opts(name) {} }; diff --git a/tracker-easy/tracker-easy-dialog.cpp b/tracker-easy/tracker-easy-dialog.cpp index 36c5d99d..fe0091c5 100644 --- a/tracker-easy/tracker-easy-dialog.cpp +++ b/tracker-easy/tracker-easy-dialog.cpp @@ -42,8 +42,6 @@ namespace EasyTracker tie_setting(s.cam_res_y, ui.res_y_spin); tie_setting(s.cam_fps, ui.fps_spin); - tie_setting(s.threshold_slider, ui.threshold_slider); - tie_setting(s.min_point_size, ui.mindiam_spin); tie_setting(s.max_point_size, ui.maxdiam_spin); tie_setting(s.DeadzoneRectHalfEdgeSize, ui.spinDeadzone); @@ -75,7 +73,6 @@ namespace EasyTracker tie_setting(s.debug, ui.debug); - tie_setting(s.auto_threshold, ui.auto_threshold); connect(ui.tcalib_button, SIGNAL(toggled(bool)), this, SLOT(startstop_trans_calib(bool))); @@ -102,37 +99,9 @@ namespace EasyTracker tie_setting(s.PnpSolver, ui.comboBoxSolvers); - tie_setting(s.threshold_slider, ui.threshold_value_display, [this](const slider_value& val) { - return threshold_display_text(int(val)); - }); - - // refresh threshold display on auto-threshold checkbox state change - tie_setting(s.auto_threshold, - this, - [this](bool) { s.threshold_slider.notify(); }); - } - - QString Dialog::threshold_display_text(int threshold_value) - { - if (!s.auto_threshold) - return tr("Brightness %1/255").arg(threshold_value); - else - { - int w = s.cam_res_x, h = s.cam_res_y; - - if (w * h <= 0) - { - w = 640; - h = 480; - } - - //SL: What are we suppose to do here? - double value = 0.0f; - - return tr("LED radius %1 pixels").arg(value, 0, 'f', 2); - } } + void Dialog::startstop_trans_calib(bool start) { QMutexLocker l(&calibrator_mutex); diff --git a/tracker-easy/tracker-easy-dialog.h b/tracker-easy/tracker-easy-dialog.h index f5a52d0c..768eaa21 100644 --- a/tracker-easy/tracker-easy-dialog.h +++ b/tracker-easy/tracker-easy-dialog.h @@ -38,7 +38,6 @@ namespace EasyTracker signals: void poll_tracker_info(); protected: - QString threshold_display_text(int threshold_value); Settings s; Tracker* tracker; diff --git a/tracker-easy/tracker-easy-settings.ui b/tracker-easy/tracker-easy-settings.ui index 9ff929dc..2ec56a04 100644 --- a/tracker-easy/tracker-easy-settings.ui +++ b/tracker-easy/tracker-easy-settings.ui @@ -117,9 +117,9 @@ 0 - + - Camera + Tracker @@ -131,35 +131,25 @@ - Camera settings + Camera - - + + - + 0 0 - - Debug (full size preview) - - - - - - - - 0 - 0 - + + Desired capture framerate - - Device + + Hz - - camdevice_combo + + 2000 @@ -176,8 +166,8 @@ - - + + 0 @@ -185,12 +175,12 @@ - Height + Camera settings (when available) - - + + 0 @@ -198,38 +188,25 @@ - Perspective-N-Point solver - - - - - - - - 0 - 0 - - - - + Width - - + + - + 0 0 - Open + Height - - + + 0 @@ -237,54 +214,24 @@ - Camera settings (when available) + FPS + + + fps_spin - - + + 0 0 - - Make sure you pick a solver supporting the number of marker you are using. For three points detection use either P3P or AP3P. - - - P3P + + Open - - - ITERATIVE - - - - - EPNP - - - - - P3P - - - - - DLS - - - - - UPNP - - - - - AP3P - - @@ -309,30 +256,8 @@ - - - - - 0 - 0 - - - - Desired capture height - - - px - - - 2000 - - - 10 - - - - - + + 0 @@ -340,25 +265,15 @@ - Width - - - - - - - - 0 - 0 - + Device - - Diagonal field of view + + camdevice_combo - - + + 0 @@ -366,29 +281,16 @@ - Desired capture framerate + Desired capture height - Hz + px 2000 - - - - - - - 0 - 0 - - - - FPS - - - fps_spin + + 10 @@ -414,6 +316,19 @@ + + + + + 0 + 0 + + + + Diagonal field of view + + + @@ -426,31 +341,27 @@ - Point extraction + Settings - - + + - + 0 0 - + Min size - - - - - - Value + + mindiam_spin - - + + 0 @@ -458,15 +369,15 @@ - Min size + Deadzone - mindiam_spin + maxdiam_spin - - + + 0 @@ -474,50 +385,54 @@ - Enable, slider sets point size + Max size + + + maxdiam_spin - - + + - + 0 0 - Threshold - - - threshold_slider + Debug (full size preview) - - + + 0 0 - - Minimum point diameter - - - px + + - - 1 + + + + + + + 0 + 0 + - - 0.100000000000000 + + Perspective-N-Point solver - - + + 0 @@ -525,30 +440,45 @@ - Intensity threshold for point extraction - - - 255 - - - 1 - - - 127 - - - Qt::Horizontal - - - QSlider::TicksBothSides + Make sure you pick a solver supporting the number of marker you are using. For three points detection use either P3P or AP3P. - - 25 + + ITERATIVE + + + ITERATIVE + + + + + EPNP + + + + + P3P + + + + + DLS + + + + + UPNP + + + + + AP3P + + - - + + 0 @@ -556,7 +486,7 @@ - Maximum point diameter + Minimum point diameter px @@ -569,52 +499,29 @@ - - - - - 0 - 0 - - - - Max size - - - maxdiam_spin - - - - - + + 0 0 - - Automatic threshold + + Maximum point diameter - - - - - - - 0 - 0 - + + px - - Deadzone + + 1 - - maxdiam_spin + + 0.100000000000000 - + @@ -1402,13 +1309,7 @@ Don't roll or change position. res_y_spin fps_spin fov - debug camera_settings - comboBoxSolvers - auto_threshold - threshold_slider - mindiam_spin - maxdiam_spin model_tabs clip_tlength_spin clip_theight_spin -- cgit v1.2.3