summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-10-13 15:05:05 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-10-13 15:09:26 +0200
commit9a0822c445e56580fb3034224191ec825ea0274a (patch)
tree9fce6a93bb72a0db6b60015b58272abe0fba68ba /tracker-pt
parent887dd41c5d67c30bd1e9631920d8fc1c3dd1a3f0 (diff)
options/tie: change "tie" overloads
Adjust usages. There are ODR issues with MSVC and it doesn't support C++17 "static inline constexpr" _variables_. Otherwise, "signal_fun" could be a variable and not a function. The usages in accela/ewma2 dialog are more verbose now but the original API was silly.
Diffstat (limited to 'tracker-pt')
-rw-r--r--tracker-pt/ftnoir_tracker_pt_dialog.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt_dialog.cpp b/tracker-pt/ftnoir_tracker_pt_dialog.cpp
index 6b31ac8a..a4b8c668 100644
--- a/tracker-pt/ftnoir_tracker_pt_dialog.cpp
+++ b/tracker-pt/ftnoir_tracker_pt_dialog.cpp
@@ -93,6 +93,23 @@ TrackerDialog_PT::TrackerDialog_PT()
ui.blob_color->setItemData(k, int(color_types[k]));
tie_setting(s.blob_color, ui.blob_color);
+
+ tie_setting(s.threshold, ui.threshold_value_display, [this](int x) {
+ if (!s.auto_threshold)
+ return tr("Brightness %1/255").arg(x);
+ else
+ {
+ CamInfo info;
+ int w = 640, h = 480;
+
+ if (tracker && tracker->get_cam_info(&info) && info.res_x * info.res_y != 0)
+ w = info.res_x, h = info.res_y;
+
+ double value = PointExtractor::threshold_radius_value(w, h, x);
+
+ return tr("LED radius %1 pixels").arg(value, 0, 'f', 2);
+ }
+ });
}
void TrackerDialog_PT::startstop_trans_calib(bool start)