From 3311da2af8cfc8ac6d83edc6a4aab6ef8a99c31b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 4 Apr 2022 11:25:54 +0200 Subject: tracker/trackhat: remove fuzz slider --- tracker-trackhat/camera.cpp | 2 +- tracker-trackhat/dialog.cpp | 16 ------ tracker-trackhat/dialog.ui | 122 +++++++++++++---------------------------- tracker-trackhat/lang/nl_NL.ts | 4 -- tracker-trackhat/lang/ru_RU.ts | 4 -- tracker-trackhat/lang/stub.ts | 4 -- tracker-trackhat/lang/zh_CN.ts | 4 -- tracker-trackhat/settings.cpp | 2 +- tracker-trackhat/trackhat.hpp | 1 - 9 files changed, 40 insertions(+), 119 deletions(-) diff --git a/tracker-trackhat/camera.cpp b/tracker-trackhat/camera.cpp index 49e20e41..033fd532 100644 --- a/tracker-trackhat/camera.cpp +++ b/tracker-trackhat/camera.cpp @@ -54,7 +54,7 @@ trackhat_camera::trackhat_camera() s.set_raii_dtor_state(false); t.set_raii_dtor_state(false); - for (auto* slider : { &t.exposure, &t.gain, &t.threshold, &t.threshold_2 }) + for (auto* slider : { &t.exposure, &t.gain, &t.threshold, }) { QObject::connect(slider, options::value_::value_changed(), &sig, &trackhat_impl::setting_receiver::settings_changed, diff --git a/tracker-trackhat/dialog.cpp b/tracker-trackhat/dialog.cpp index cf0f67db..2a7bf119 100644 --- a/tracker-trackhat/dialog.cpp +++ b/tracker-trackhat/dialog.cpp @@ -46,30 +46,14 @@ trackhat_dialog::trackhat_dialog() // threshold - connect(ui.threshold_slider, &QSlider::valueChanged, this, [this] (int value) { - if (value <= ui.threshold_2_slider->value()) - ui.threshold_2_slider->setValue(value-1); - }, Qt::DirectConnection); - - connect(ui.threshold_2_slider, &QSlider::valueChanged, this, [this] (int value) { - if (value >= ui.threshold_slider->value()) - ui.threshold_slider->setValue(value+1); - }, Qt::DirectConnection); - tie_setting(t.threshold, ui.threshold_slider); - tie_setting(t.threshold_2, ui.threshold_2_slider); ui.threshold_label->setValue((int)*t.threshold); - ui.threshold_2_label->setValue((int)*t.threshold_2); connect(&t.threshold, value_::value_changed(), ui.threshold_label, [=] { ui.threshold_label->setValue((int)*t.threshold); }, Qt::QueuedConnection); - connect(&t.threshold_2, value_::value_changed(), ui.threshold_2_label, [=] { - ui.threshold_2_label->setValue((int)*t.threshold_2); - }, Qt::QueuedConnection); - // point filter tie_setting(t.enable_point_filter, ui.enable_point_filter); diff --git a/tracker-trackhat/dialog.ui b/tracker-trackhat/dialog.ui index d39b1778..6bb7f515 100644 --- a/tracker-trackhat/dialog.ui +++ b/tracker-trackhat/dialog.ui @@ -7,7 +7,7 @@ 0 0 365 - 510 + 485 @@ -65,27 +65,41 @@ - - - - Qt::NoFocus - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + Threshold - - true + + + + + + + 0 + 0 + - - QAbstractSpinBox::NoButtons + + 64 - 999 + 254 + + + Qt::Horizontal - - + + + + Gain + + + + + Qt::NoFocus @@ -103,13 +117,6 @@ - - - - Threshold - - - @@ -129,67 +136,8 @@ - - - - - 0 - 0 - - - - 64 - - - 254 - - - Qt::Horizontal - - - - - - - Exposure - - - - - - - Gain - - - - - - - Fuzz - - - - - - - - 0 - 0 - - - - 1 - - - 254 - - - Qt::Horizontal - - - - - + + Qt::NoFocus @@ -207,6 +155,13 @@ + + + + Exposure + + + @@ -642,7 +597,6 @@ exposure_slider gain_slider threshold_slider - threshold_2_slider model_type min_point_size max_point_size diff --git a/tracker-trackhat/lang/nl_NL.ts b/tracker-trackhat/lang/nl_NL.ts index 34639a9d..50fdef30 100644 --- a/tracker-trackhat/lang/nl_NL.ts +++ b/tracker-trackhat/lang/nl_NL.ts @@ -59,10 +59,6 @@ Gain - - Fuzz - - Model diff --git a/tracker-trackhat/lang/ru_RU.ts b/tracker-trackhat/lang/ru_RU.ts index 939cb91e..23c14ed4 100644 --- a/tracker-trackhat/lang/ru_RU.ts +++ b/tracker-trackhat/lang/ru_RU.ts @@ -59,10 +59,6 @@ Gain - - Fuzz - - Model diff --git a/tracker-trackhat/lang/stub.ts b/tracker-trackhat/lang/stub.ts index d4c0e011..17ca6da6 100644 --- a/tracker-trackhat/lang/stub.ts +++ b/tracker-trackhat/lang/stub.ts @@ -23,10 +23,6 @@ Gain - - Fuzz - - Model diff --git a/tracker-trackhat/lang/zh_CN.ts b/tracker-trackhat/lang/zh_CN.ts index 566a298a..1c7f83ae 100644 --- a/tracker-trackhat/lang/zh_CN.ts +++ b/tracker-trackhat/lang/zh_CN.ts @@ -59,10 +59,6 @@ Gain - - Fuzz - - Model diff --git a/tracker-trackhat/settings.cpp b/tracker-trackhat/settings.cpp index 55ba5928..f9a866bf 100644 --- a/tracker-trackhat/settings.cpp +++ b/tracker-trackhat/settings.cpp @@ -83,7 +83,7 @@ bool trackhat_camera::init_regs() auto exp = (uint8_t)t.exposure; auto exp2 = (uint8_t)(exp == 0xff ? 0xf0 : 0xff); auto thres = (uint8_t)t.threshold; - auto thres2 = (uint8_t)std::clamp((int)*t.threshold_2, 0, std::max(64, thres-1)); + auto thres2 = (uint8_t)3; auto gain = (uint8_t)((int)*t.gain); auto gain_c = (uint8_t)(gain/0x10); diff --git a/tracker-trackhat/trackhat.hpp b/tracker-trackhat/trackhat.hpp index ff6f2eec..1e1857f5 100644 --- a/tracker-trackhat/trackhat.hpp +++ b/tracker-trackhat/trackhat.hpp @@ -34,7 +34,6 @@ struct trackhat_settings : opts value exposure{b, "exposure", {0x80, 0x10, 0xff}}; value gain{b, "gain", {16, 0, 47}}; value threshold{b, "threshold", {0x97, 64, 0xfe}}; - value threshold_2{b, "threshold-2", {0x03, 1, 0xfe}}; value model{b, "model", model_mini_clip_left}; value min_pt_size{b, "min-point-size", 10}; value max_pt_size{b, "max-point-size", 50}; -- cgit v1.2.3