4.5

4.5 | 2 ratings Rate this file 109 Downloads (last 30 days) File Size: 3.81 MB File ID: #40968
image thumbnail

Real time optical flow, and video processing

by

 

27 Mar 2013 (Updated )

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

| Watch this File

File Information
Description

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".

MATLAB release MATLAB 7.10 (R2010a)
Other requirements in order to compile the mex files, you will need "openMP". Should compile without it, but you will get slower speed for the gradient calculations. Try the precompiled binaries at my homepage in that case.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (10)
05 Oct 2014 Stefan Karlsson

@sachin,

1) folder c-code has a file make.m
2) for most purposes, you would probably be better off looking at my other optical flow submission, its a more stable implementation

30 Jul 2014 sachin

I am using Matlab R2013a , when i have runMe.m file , i have got error like please let me know how i can solve ???
Undefined function or variable 'Grad3D7do'.

Error in vidProcessing (line 87)
Grad3D7do();

Error in runMe (line 56)
vidProcessing(movieType, method,
spdFactor,bFineScale,nofTimeSlices);

27 Nov 2013 Stefan Karlsson

@sameer

If you are interested in tracking lips contours a good thing to look into is active appearance models. These do not work so well for speech dynamics in realtime, but excellent for static emotion analysis. Works especially well if you have a view of the entire face.

27 Nov 2013 Stefan Karlsson

For Matlab 2013, this version is now actually both faster, more stable and easier to use:

http://www.mathworks.com/matlabcentral/fileexchange/44400-tutorial-on-real-time-optical-flow

25 Nov 2013 SAMEER ahamed

Hello,

i want to detect outer lip contour and tracking . please let me know (in computer vision tool box possible to implement?).like reference from link http://islab.hh.se/mediawiki/index.php/Stefan_Karlsson/PersonalPage/ArticularyDynamics

20 Nov 2013 Stefan Karlsson

@SAMEER,
This is the optimized module for calculating gradients. If you read the description for this submission, there is a URL where you can get a precompiled binary (that way you dont have to compile it yourself).

12 Nov 2013 SAMEER ahamed

I am using Matlab R2013a , when i have runMe.m file , i have got error like please let me know how i can solve ???
Undefined function or variable 'Grad3D7do'.

Error in vidProcessing (line 87)
Grad3D7do();

Error in runMe (line 56)
vidProcessing(movieType, method,
spdFactor,bFineScale,nofTimeSlices);

31 Oct 2013 Stefan Karlsson

@Avi, Thank you.

@xiangz, can you be more specific on the problem? Type some code that I can run, and describe the problem with the output. Thanks for your interest

21 Oct 2013 Avi Nehemiah

Thanks for the great submission, i really liked the approach of showing the different methods.

Information on some other optical flow methods and examples can be found at this link: http://www.mathworks.com/discovery/optical-flow.html

23 Sep 2013 xiangz ?

It's really brilliant to put the five methods all together. It is more easily to compare.
But when I try the KL or the improvedKL, the "line motion (U2, V2)" was not sign in the function "DoFlow", certainly It won't run. Is there something I can do for that?

Updates
28 Mar 2013

Just clarified description text

Contact us