File Exchange

image thumbnail

Lucas-Kanade Tutorial Example 2

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


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

Comments and Ratings (6)

Rui Shi


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?


Arezoo Fard


MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor