Real time optical flow, and video processing
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 (2024). 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
Platform Compatibility
Windows macOS LinuxCategories
- Image Processing and Computer Vision > Computer Vision Toolbox > Tracking and Motion Estimation > Motion Estimation >
- FPGA, ASIC, and SoC Development > Vision HDL Toolbox > Video Formats and Interfaces >
- Image Processing and Computer Vision > Vision HDL Toolbox > Video Formats and Interfaces >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.