Real time optical flow, and video processing

Real time optical flow, and video processing, with support for camera input in Matlab.
Updated 22 Nov 2015

View License

NOTE: this submission is obsolete. The version here:
is in every sense better.
I leave this submission online, because it contains som MEX optimization in a streaming application that might be useful for some. Since Matlab incorporated JIT compilation, these mex optimizations are less effecient than doing it purely in Matlab, even with using openMP. Original description follows:

Start by running "runMe.m"

Supports input through:
a) synthetically generated test images
b) reading avi-file
c) camera input (requires image aquisition toolbox)

Calculates optical flow by 4 different local methods(all moment based), 2 implementations of Lucas and Kanade, and 2 implementations of point-line flow.

Can process easily hundreds of frames per second on a laptop for resolution 200x200 images.

Entirely implemented in Matlab, except for a small mex-module that calculates the gradient field. You can either download this mex binary here:

... or you can compile the code in the folder c-code. This has a script "make.m".

Cite As

Stefan Karlsson (2024). Real time optical flow, and video processing (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Just clarified description text
clarified description, this submission is obsolete.