entry_exit_mouse_box.media_manager module
- class entry_exit_mouse_box.media_manager.MediaManager(viewer)[source]
Bases:
object
- add_source(file_path, target_layer, img_type, process=None)[source]
Add a new video source to the manager.
- Parameters:
file_path – Path of the video file to be opened.
target_layer – Name of the layer to which each frame of the video will be loaded.
img_type – Type of the image to be loaded (‘image’ or ‘labels’).
process – Function to be applied to each frame of the video before displaying it.
- Raises:
FileNotFoundError – If the file is not found at the specified path.
IOError – If the file cannot be opened.
ValueError – If the properties of the video do not match the properties of the media already opened.
- Returns:
The properties of the last video added under the form of a dictionary.