mflowm.flow
Module Contents
Classes
Create a collection of name/value pairs. |
|
A class to handle multi-pass motion flow computation |
- class mflowm.flow.CompositeMode(*args, **kwds)
Bases:
enum.EnumCreate a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- NONE = 0
- SIMPLE = 1
- GLITCH = 2
- BROKEN_A = 3
- BROKEN_B = 4
- class mflowm.flow.MotionFlowMulti(video_file: mflowm.files.VideoReader, mode: CompositeMode = CompositeMode.NONE, trails: bool = False, num_windows: int = 7, windows_min: int = 7, windows_max: int = 35, windows_balance: bool = False, layers: int = 1, iterations: int = 3, poly_n: int = 7, poly_sigma: int = 1.5, blur_amount: int = 1.5, fade_speed: float | None = 2)
A class to handle multi-pass motion flow computation
- get_next_frame()
- convert_to_file(filename_suffix='_flow', output_scale=1, display_scale=1, output_scale_method=cv2.INTER_NEAREST, display_scale_method=cv2.INTER_NEAREST, window_title='Python MotionFlowMulti (mflowm)', quit_key='q', fade_to_black=True)