Trackbar¶
-
class
ocvproto.ui.trackbars.base.
Trackbar
(name, *, max: Union[int, float] = None, default: Union[int, float] = None, callback: Callable = None, step: Union[int, float] = None, keys: str = None)¶ Represents a trackbar.
Parameters: - name – Name to show in UI and address this in opencv api.
- max – Max value. Default: 100
- default – Default (current) value. Default: 0
- callback – Function to be called on trackbar value change through UI.
- step – Step to inc/dec trackbar value. Default: 1
- keys – Two-letter string to represent keys to inc and dec value.
-
bind
(window_name: str)¶ Binds the trackabr to the given window.
Parameters: window_name –
-
dec
()¶ Decrements the current value.
-
get_value
() → Union[int, float]¶ Force getting current value.
-
inc
()¶ Increments the current value.
-
onChange
(val: Union[int, float])¶ Issued on value change from UI.
-
set_keys
(keys: str)¶ Set keys to inc/dec trackbar value.
Parameters: keys – Two-letter string to represent keys to inc and dec value.
-
value
¶ Current trackbar value.