Code covered by the BSD License  

Highlights from
Lucas Kanade affine template tracking

5.0

5.0 | 1 rating Rate this file 128 Downloads (last 30 days) File Size: 7.16 MB File ID: #24677
image thumbnail

Lucas Kanade affine template tracking

by Dirk-Jan Kroon

 

09 Jul 2009 (Updated 01 Oct 2009)

Lucas Kanade affine template tracking , also robust inverse in c-code.

| Watch this File

File Information
Description

Description:
This is an affine Lucas Kanade template tracker, which performs template tracking between movie frames. For example, to follow cars, moving coronary arteries or measure camera rotation.

The Matlab code is written to show the same steps as in the Literature, not optimized for speed. But also an inverse Lucas Kanada algorithm in c-code for quick template tracking is included, which also contains pixel weighting for more robustness.

Literature:
S. Baker et Al. "Lucas-Kanade 20 Years On: A Unifying Framework"
D. Schreiber, "Robust template tracking with drift correction"

Demo:
Try the TTdemo.m, see screenshot!

Hints:
You can easily adapted the template tracking TTdemo to your own application, for instance:

- Update the template with image data from the new ROI found in the next movie frame.
- Use the ROIs in the next movie frames, also as templates.
- Calculate the speed from difference in affine parameters between movie frames. Speed can be used to detect if tracking fails, or to smooth the tracking, or to predict the next template position.

 
Comment:
Bugs, success and other comments are welcome!

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
22 Nov 2009 Raymond Cheng  
22 Nov 2009 Raymond Cheng

Nice demo.

25 Aug 2011 Sonia Chikh

hello, I just get started with matlab. I used to write all in C++. but Ir really need this KLT tracker for my work. but I can't manipulate the .mat file :s
I wanted to change the movie used but couldn't can you, please, tell me how... thanks a lot.

Please login to add a comment or rating.
Updates
10 Aug 2009

Reliability matrix added, fixed missing code line in LucasKanadeAffine.m

01 Oct 2009

Linux Ubuntu Tested

Tag Activity for this File
Tag Applied By Date/Time
lucas kanade Dirk-Jan Kroon 09 Jul 2009 13:39:37
lucaskanade Dirk-Jan Kroon 09 Jul 2009 13:39:37
affine Dirk-Jan Kroon 09 Jul 2009 13:39:37
template Dirk-Jan Kroon 09 Jul 2009 13:39:37
tracking Dirk-Jan Kroon 09 Jul 2009 13:39:37
template tracking Dirk-Jan Kroon 09 Jul 2009 13:39:37
kanade Dirk-Jan Kroon 09 Jul 2009 13:39:37
track Dirk-Jan Kroon 09 Jul 2009 13:39:37
inverse Dirk-Jan Kroon 09 Jul 2009 13:39:37
lk Dirk-Jan Kroon 09 Jul 2009 13:39:37
lucas Dirk-Jan Kroon 09 Jul 2009 13:39:37
lucas kanade Florian 01 Oct 2009 09:00:29
template Li 03 Jun 2011 03:37:25
lk Michael 19 Jul 2011 00:22:26

Contact us at files@mathworks.com