How younesmlik/motion_estimation works
This Python application processes a video into consecutive-frame optical-flow results and displays each original frame alongside a visualization. The main workflow runs from the command-line entry point through video reading, grayscale conversion, flow calculation, and visualization, then renders results in an OpenCV window. The flow module provides several selectable algorithms; shared types define the result and configuration contracts. Relationships are based on the sampled source; the README is empty, so undocumented capabilities are not inferred.
Main entry points: pipeline.py Frame pipeline · types.py Flow contracts · cli.py CLI runner · video.py Video reader
Components 8
Video input
- Video reader
src/motion_estimation/video.py
Flow processing
- Flow contracts
src/motion_estimation/types.py - Flow algorithms
src/motion_estimation/flow.py - Frame pipeline
src/motion_estimation/pipeline.py - Flow visualization
src/motion_estimation/visualization.py
CLI display
- CLI runner
src/motion_estimation/cli.py - Window renderer
src/motion_estimation/cli.py
Other components
- Video user
Connections 10
- Video user → CLI runner: supplies video
src/motion_estimation/cli.py - CLI runner → Frame pipeline: runs processing
src/motion_estimation/cli.py - Frame pipeline → Video reader: reads frames
src/motion_estimation/pipeline.py - Frame pipeline → Flow algorithms: calculates flow
src/motion_estimation/pipeline.py - Frame pipeline → Flow visualization: visualizes flow
src/motion_estimation/pipeline.py - Frame pipeline → Flow contracts: yields results
src/motion_estimation/pipeline.py - Flow algorithms → Flow contracts: uses flow types
src/motion_estimation/flow.py - Video reader → Flow contracts: converts image types
src/motion_estimation/video.py - Flow visualization → Flow contracts: uses result types
src/motion_estimation/visualization.py - CLI runner → Window renderer: renders results
src/motion_estimation/cli.py