Code covered by the BSD License  

Highlights from
Lucas & Kanade Pyramidal Refined Optical Flow implementation

4.75
4.8 | 4 ratings Rate this file 46 Downloads (last 30 days) File Size: 73.9 KB File ID: #22950
image thumbnail

Lucas & Kanade Pyramidal Refined Optical Flow implementation

by

Julien Marzat

 

11 Feb 2009 (Updated )

This file implements the well-known LK algorithm, with regularization and subpixelic computation.

| Watch this File

File Information
Description

This algorithm has also been implemented in CUDA language for parallel execution, which allows to perform real-time optical flow. See CUDA Zone for more details.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7 (R14)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (13)
18 May 2014 Y Simson

Y Simson

Shouldn't line 98-99 be:

u=u(hw:size(u,1)-hw+1,hw:size(u,2)-hw+1);
v=v(hw:size(v,1)-hw+1,hw:size(v,2)-hw+1);

instead of:

u=u(window:size(u,1)-window+1,window:size(u,2)-window+1);
v=v(window:size(v,1)-window+1,window:size(v,2)-window+1);

Comment only
17 May 2014 Y Simson

Y Simson

 
26 Apr 2014 ming

ming

 
14 Dec 2012 Guo

Guo

Thank you! It's my need

Comment only
20 Jun 2012 Andy

Andy

Thanks for sharing it.

Comment only
07 Oct 2011 F Oneair

F Oneair

Hi,
whitch terms should I delete if I want compute the optical flow only in the horizontal direction (I work with rectified images) ? thx

Comment only
17 Jul 2011 Vasiliki

Vasiliki

The code worked but I have some questions.
Why are the velocity arrays not of equal sizes as the image?
I used the images you included 252x316 and u and v where of 236x300.
While reconstuncting the image I(i,j) = Iold(i+u,j+v) the result wasn't very good. Have you tried reconstructing the image using only the first one and the velocity vectors? If so, can you provide the source ( just to check if my reconstructing code is bad written)?

Comment only
24 Jan 2011 Leo Ono

Leo Ono

 
15 Nov 2010 pupu QQ

pupu QQ

files are not complete,what is the meaning of the result pic?

Comment only
15 Nov 2010 pupu QQ

pupu QQ

 
15 Nov 2010 pupu QQ

pupu QQ

no problem with matlab 2009

Comment only
17 Nov 2009 Said Pertuz

Said Pertuz

Sorry, the function 'impyramid' is not provided and thus, I could not test the code.
Said

Comment only
11 Feb 2009 us

us

LKPR-marzat is NOT a valid file name...
us

Comment only
Updates
11 Feb 2009

filename fixed

Contact us