File Exchange

image thumbnail

Lucas-Kanade Tutorial Example 2

version 1.0.0.0 (818 KB) by Zhiyuan
This example shows how to use Lucas-Kanade method to calculate optical flow velocity for objects

22 Downloads

Updated 15 Dec 2014

View License

Lucas-Kanade method is used for to consecutive frames and the optical flow is calculated for the corners (objects).

Cite As

Zhiyuan (2020). Lucas-Kanade Tutorial Example 2 (https://www.mathworks.com/matlabcentral/fileexchange/48745-lucas-kanade-tutorial-example-2), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (7)

hao wang

对时间的差分
It_m = conv2(im1, ones(2), 'valid') + conv2(im2, -ones(2), 'valid'); % partial on t
默认的时间间隔是1秒吗?两张图片特征点的位移,数值上是否等于光流?

Rui Shi

Sahin

Hello Mr.Zhiyuan, I'm new to Lucas-Kanade method and trying to learn it. Your sharing (Lucas-Kanade Tutorial Example 2) is guiding me. I have 2 questions about your example for clearing my mind.
1) Why have you reduced the size of the image? Is it about motion quantity between two frames? Instead of reducing the size, wouldn't it be enough smoothing the image?
2) Why have you discarded the corners near the margin of the image?

AllenPei

Arezoo Fard

Azin Karimzad

Youssef

MATLAB Release Compatibility
Created with R2014b
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!

LucasKanadeExample2/html/