vuba.VideoGUI
- class vuba.VideoGUI(video, indices=(None, None), *args, **kwargs)[source]
Class for creating interfaces for manipulating a sequence of frames.
- Parameters
video (vuba.Video) – Video to manipulate within the interface.
indices (tuple) – Frame indices to limit GUI to, especially useful when analysing long sequences of footage. First index will always be interpreted as the minimum index and the second as the maximum index. If None is specified to either limit, then that limit will be ignored. Default is for no limits, i.e. (None, None).
title (str) – Title of the interface window.
- Returns
gui – Class object for creating the interactive window.
- Return type
Notes
Any gui created with this class will by default have a frame trackbar and corresponding callback for retrieving frames from the video provided at initiation (see
VideoGUI.read
).Examples
Please see the following example scripts for some typical applications of this class:
examples/interfaces/frame_viewer.py
examples/interfaces/binary_threshold_viewer_with_drawing_video.py
Methods
__init__
(video[, indices])method
(func)Add a main processing function to be executed on every trackbar call.
read
(gui, val)Callback for reading and displaying a frame from the requested video.
run
()Launch the interactive video interface.
trackbar
(name, id, min, max)Add a trackbar to the interactive window.
values
()Retrieve all current trackbar values from the interface.