Skip to content
Optical Flow estimation in pure Python
Branch: master
Clone or download
scivision Merge pull request #2 from Ilya-Muromets/master
Fixed broken plot indexing for non-square images
Latest commit c6c3548 Nov 8, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data fork Oct 19, 2016
matlab
pyoptflow Fixed broken plot indexing for non-square images Nov 6, 2018
tests pytest template Aug 27, 2018
.appveyor.yml CI tempalte Aug 15, 2018
.codeclimate.yml doc Nov 8, 2017
.gitignore CI tempalte Aug 15, 2018
.travis.yml pytest template Aug 27, 2018
HornSchunck.py CI tempalte Aug 15, 2018
LICENSE Initial commit Oct 19, 2016
LucasKanade.py
README.md
setup.cfg pytest template Aug 27, 2018
setup.py CI tempalte Aug 15, 2018

README.md

image image image image Maintainability Python versions (PyPI) Distribution format (PyPI) PyPi Download stats

Optical Flow: Horn-Schunck

Python implementation of optical flow estimation using only the Scipy stack for:

  • Horn Schunck

Lucas-Kanade is also possible in the future, let me know if you're interested in Lucas Kanade.

Install

Requires Python ≥ 3.6:

pip install -e .

optionally, to run self-tests:

pip install -e .[tests]

pytest -v

Examples

The program scripts expect directory glob pattern

imageio loads a wide varity of images and video.

Box

python HornSchunck.py data/box box*.bmp

Office

all time steps:

python HornSchunck.py data/office office*.bmp

or just the first 2 time steps:

python HornSchunck.py data/office office.[0-2].bmp

Rubic

python HornSchunck.py data/rubic rubic*.bmp

Sphere

python HornSchunck.py data/sphere sphere*.bmp

Compare: Matlab Computer Vision toolbox

In Matlab directory, similar method in Octave and a comparison plot using Matlab Computer Vision toolbox.

Reference

Inspiration

You can’t perform that action at this time.