diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-04-26 18:58:49 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-04-26 18:58:49 +0200 |
commit | 9ef0dea80ef67d739c11cd3d88f12250ddecf612 (patch) | |
tree | 68cd514732fa4ce1142eb57ff55495d9debc0fff /tracker-trackhat/trackhat.hpp | |
parent | 248bd81caceb21e3e278e340388425b9f102c34c (diff) |
tracker/trackhat: merge gain/exposure sliders
Diffstat (limited to 'tracker-trackhat/trackhat.hpp')
-rw-r--r-- | tracker-trackhat/trackhat.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tracker-trackhat/trackhat.hpp b/tracker-trackhat/trackhat.hpp index 1e1857f5..1ae67e1c 100644 --- a/tracker-trackhat/trackhat.hpp +++ b/tracker-trackhat/trackhat.hpp @@ -30,9 +30,13 @@ TH_ErrorCode log_error(TH_ErrorCode error, const char* source, const char* file, struct trackhat_settings : opts { + static constexpr int min_gain = 16, max_gain = 47, + min_exposure = 0x10, max_exposure = 0xff; + static constexpr int num_exposure_steps = max_gain + max_exposure - min_gain - min_exposure; + int effective_exposure() const; + int effective_gain() const; trackhat_settings(); - value<slider_value> exposure{b, "exposure", {0x80, 0x10, 0xff}}; - value<slider_value> gain{b, "gain", {16, 0, 47}}; + value<slider_value> exposure{b, "exposure", {min_exposure, min_exposure, max_exposure + max_gain - min_gain}}; value<slider_value> threshold{b, "threshold", {0x97, 64, 0xfe}}; value<model_type> model{b, "model", model_mini_clip_left}; value<double> min_pt_size{b, "min-point-size", 10}; |