Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

fl::KLT Class Reference

#include <track.h>

Inheritance diagram for fl::KLT:

fl::PointTracker List of all members.

Public Methods

 KLT (int windowRadius=3, int searchRadius=15)
virtual void nextImage (const Image &image)
 Push the current image back to the "previous" position, and make the given image the "current" image.

virtual void track (Point &point)
float track (const Point &point0, const int level, Point &point1)
 Subroutine of track().


Public Attributes

std::vector< ImageOf< float > > pyramid0
 "previous" image. First entry is full sized image, and each subsequent entry is downsampled by 2.

std::vector< ImageOf< float > > pyramid1
 "current" image. Same structure as pyramid0

Gaussian1D preBlur
 For blurring full image at base of pyramid. Purpose is to ensure smooth texture within search window.

float pyramidRatio
 Ratio between number of pixels in adjacent levels of pyramid.

int windowRadius
 Number of pixels from center to edge of search window.

int windowWidth
 Diameter of search window.

float minDeterminant
 Smallest allowable determinant of second moment matrix.

float minDisplacement
 Convergence threshold on change in location.

int maxIterations
 To quit iterating even without convergence.

float maxError
 Largest allowable root mean squared error of pixel intensity within the window. Note that intensity is in the range [0,1].


Detailed Description

The Kanade-Lucas-Tomasi tracker. This implementation is inspired by the Birchfield implementation. The Birchfield software is a complete tracker, including point selection, replenishment, tracking, and verification. However, this class only does the job of estimating an updated location. The client program must generate and manage interest points, as well as verify the new locations.


Constructor & Destructor Documentation

KLT::KLT int    windowRadius = 3,
int    searchRadius = 15
 

Parameters:
windowRadius  The number of discrete pixels beyond the center pixel to use when solving the position update equation. The full window size will be 2 * windowRadius + 1.
searchRadius  The largest expected distance between the previous and current positions of a given point. Determines number of levels in pyramid and degree of downsampling.
Todo:
Track blobs (as opposed to just corners): The code currently depends on a large determinant in the second moment matrix, which is generally associated with Harris points. Examine whether it is possible to formulate a similar numerical search for blob-like structures. For example, if the determinant of the second moment matrix is negligible, then the first order terms of the Taylor expansion (see papers) is zero, and we can use second order Taylor terms instead. Unfortunately, this would only work for blobs on the same scale as the search window. We may need to code an adaptive window size. Furthermore, this may vary depending on the level in the pyramid.


Member Function Documentation

void KLT::nextImage const Image   image [virtual]
 

Push the current image back to the "previous" position, and make the given image the "current" image.

Implements fl::PointTracker.

float KLT::track const Point   point0,
const int    level,
Point   point1
 

Subroutine of track().

Returns:
RMS error of pixel intensity within window.

void KLT::track Point   point [virtual]
 

Exceptions:
int  Indicates the following kinds of failures:
  • 2 -- Determinant of second moment matrix is too small, so can't solve tracking equation.
  • 3 -- Did not converge within maxIterations. Not necessarily fatal, since it could be a cyclical fixed point near the correct answer (but not near enough to be under maxDisplacement).
  • 4 -- Point has move out of bounds.
  • 5 -- RMS error of pixels in window exceeds maxError, suggesting that we may no longer be looking at the same spot on the object.
In all cases, the best estimate of the point's location is returned.

Implements fl::PointTracker.


Member Data Documentation

float fl::KLT::maxError
 

Largest allowable root mean squared error of pixel intensity within the window. Note that intensity is in the range [0,1].

int fl::KLT::maxIterations
 

To quit iterating even without convergence.

float fl::KLT::minDeterminant
 

Smallest allowable determinant of second moment matrix.

float fl::KLT::minDisplacement
 

Convergence threshold on change in location.

Gaussian1D fl::KLT::preBlur
 

For blurring full image at base of pyramid. Purpose is to ensure smooth texture within search window.

std::vector< ImageOf<float> > fl::KLT::pyramid0
 

"previous" image. First entry is full sized image, and each subsequent entry is downsampled by 2.

std::vector< ImageOf<float> > fl::KLT::pyramid1
 

"current" image. Same structure as pyramid0

float fl::KLT::pyramidRatio
 

Ratio between number of pixels in adjacent levels of pyramid.

int fl::KLT::windowRadius
 

Number of pixels from center to edge of search window.

int fl::KLT::windowWidth
 

Diameter of search window.


The documentation for this class was generated from the following files:
Generated on Thu Dec 9 17:13:25 2004 for fl by doxygen1.2.18