image thumbnail

Real time optical flow, and video processing

version 1.1.0.0 (3.81 MB) by Stefan Karlsson
Real time optical flow, and video processing, with support for camera input in Matlab.

4.9K Downloads

Updated 22 Nov 2015

View License

NOTE: this submission is obsolete. The version here:
http://www.mathworks.com/matlabcentral/fileexchange/44400-tutorial-and-toolbox-on-real-time-optical-flow
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:

http://islab.hh.se/mediawiki/index.php/Stefan_Karlsson/PersonalPage

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

Cite As

Stefan Karlsson (2021). Real time optical flow, and video processing (https://www.mathworks.com/matlabcentral/fileexchange/40968-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!