GPU_KLT: A GPU-based Implementation of the
Kanade-Lucas-Tomasi Feature Tracker


GPU_KLT is a C++ implementation using OpenGL/Cg, of the popular KLT feature tracker which runs primarily on the graphics processing unit (GPU). The GPU implementation emulates the implementation by Birchfield[1] of the KLT algorithm proposed by Lucas and Kanade [1] and Tomasi and Kanade [2].

GPU_KLT tracks approximately 1000 feature points within 1024x768 resolution video at 30 Hz on an ATI 1900 XT and at 25 Hz on a Nvidia Geforce 7900 GTX. It can thus be used for real-time vision applications.

New !!

  • I have graduated. GPU_KLT src code is now hosted on the Urbanscape page (see link below). this page will continue to be around but will not be maintained.
  • [New Version of Gain-adaptive KLT tracker on GPU from C. Zach et. al.]
  • GPU_KLT now works on Nvidia GeForce 8800. Read email below. Download new version (winxp) from below.
  • Visual Studio 8 Solution, Project files are provided now. Download (winxp) from below.


Many of you had pointed out that the tracker doesn't work on the Nvidia 8800 Gtx card. 
I am grateful to Pedro Leite  [pedro.leite@gmail.com] for pointing out the problem.
Here is his email ... please download the new version of the code. 

Pedro Leite wrote:
  As you can see, in your code, feature selection and reselection was
  doing fine, but tracking them was the key problem. For convolutions
  and the computation of the floating windows, it uses GL_QUADS to
  activate Cg kernels. Computing partial sums and solving equations is
  done through the use of GL_POINTS and GL_LINES. The problem here
  lies on the graphics card subpixel resolution. The 7900 GTX has a
  12bits subpixel resolution, while the 8800 GTX has 8bits. So
  plotting points and lines (which have a width or height of one
  pixel) on a 8800GTX would not result in a accurate position, even
  with orthogonal projection. So some kernels (Cg code) were getting
  invalid data from textures and propagating such errors. Instead of
  using GL_POINTS or GL_LINES, I've patched the code to use GL_QUADS
  whenever the subpixel resolution is less than 12 (yep, it's a cheap
  trick, but at least that works). One disadvantage of my
  modifications is that at those points (partial sums, solvers, etc.)
  the shaders will run three or two times more, for points or lines,

Pedro Leite
Academic: http://www.cin.ufpe.br/~pjsl/
Blog: http://pedroleite.wordpress.com/
GRVM: http://www.gprt.ufpe.br/~grvm/

Platforms (WinXP, Linux)

Source code is provided for WinXP and Linux. Yucheng Low (ylow@andrew.cmu.edu) and Christopher Geyer (cgeyer@cs.cmu.edu) at the Robotics Institute, Carnegie Melon University ported the project to Linux and have agreed to share it with the research community. Check below for the link to the src code.

The windows version has been tested on various NVidia and ATI cards listed below. The Linux version has been tested with a NVidia 7600GT. The Firewire camera input functionality hasn't been tested on Linux.

SIFT Feature Extraction on the GPU

If you are interested in an implementation of SIFT FEATURE EXTRACTION on the GPU, please go to ChangChang Wu's SiftGPU page here

GPU vs. CPU timings






Sudipta N Sinha, Jan-Michael Frahm, Marc Pollefeys and Yakup Genc, "GPU-Based Video Feature Tracking and Matching", EDGE 2006, workshop on Edge Computing Using New Commodity Architectures, Chapel Hill, May 2006. [pdf]

Sudipta N Sinha, Jan-Michael Frahm, Marc Pollefeys and Yakup Genc, "GPU-Based Video Feature Tracking and Matching", Technical Report 06-012, Department of Computer Science, UNC Chapel Hill, May 2006. [pdf]

Sudipta N Sinha, Jan-Michael Frahm, Marc Pollefeys and Yakup Genc, "Feature Tracking and Matching in Video Using Programmable Graphics Hardware", Machine Vision and Applications, DOI 10.1007/s00138-007-0105-z, November, 2007


[1] Stan Birchfield. KLT: An Implementation of the Kanade-Lucas-Tomasi Feature Tracker

[2] Bruce D. Lucas and Takeo Kanade. An Iterative Image Registration Technique with an Application to Stereo Vision. International Joint Conference on Artificial Intelligence, pages 674-679, 1981.

[3] Carlo Tomasi and Takeo Kanade. Detection and Tracking of Point Features. Carnegie Mellon University Technical Report CMU-CS-91-132, April 1991.

[4] GPGPU Concepts. www.gpgpu.org

Website not maintained anymore :(    Last Modified: Jan 15, 2010.