Python implementation of optical flow estimation using only the Scipy stack for:
- Horn Schunck
Lucas-Kanade is also possible in the future, let us know if you're interested in Lucas Kanade.
python -m pip install -e .optionally, to run self-tests:
python -m pip install -e .[tests]
pytest -vThe program scripts expect directory glob pattern
imageio loads a wide varity of images and video.
Box:
python HornSchunck.py src/pyoptflow/data/tests/box box*.bmpOffice: all time steps:
python HornSchunck.py src/pyoptflow/data/tests/office office*.bmpor just the first 2 time steps:
python HornSchunck.py src/pyoptflow/data/tests/office office.[0-2].bmpRubic:
python HornSchunck.py src/pyoptflow/data/tests/rubic rubic*.bmpSphere
python HornSchunck.py src/pyoptflow/data/tests/sphere sphere*.bmpCompare: Matlab Computer Vision toolbox: in matlab, similar method in Octave and a comparison plot using Matlab Computer Vision toolbox.
Reference:Inspiration