public class KltTracker<InputImage extends ImageSingleBand,DerivativeImage extends ImageSingleBand>
extends java.lang.Object
A Kanade-Lucas-Tomasi (KLT) [1,2,3,4] point feature tracker for a single layer gray scale image. It tracks point features across a sequence of images by having each feature individually follow the image's gradient. Feature locations are estimated to within sub-pixel accuracy.
For this particular implementation of KLT, image derivatives is only needed when setDescription() is called. Tracker quality will degrade if features change orientation, but this technique is significantly faster.
Citations:
[1] 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.
[2] Carlo Tomasi and Takeo Kanade. Detection and Tracking of Point Features. Carnegie
Mellon University Technical Report CMU-CS-91-132, April 1991.
[3] Jianbo Shi and Carlo Tomasi. Good Features to Track. IEEE Conference on Computer
Vision and Pattern Recognition, pages 593-600, 1994.
[4] Stan Birchfield, http://www.ces.clemson.edu/~stb/klt/
Modifier and Type | Field and Description |
---|---|
protected KltConfig |
config |
protected DerivativeImage |
derivX |
protected DerivativeImage |
derivY |
protected ImageFloat32 |
descFeature |
protected float |
Ex |
protected float |
Ey |
protected float |
Gxx |
protected float |
Gxy |
protected float |
Gyy |
protected InputImage |
image |
protected InterpolateRectangle<DerivativeImage> |
interpDeriv |
protected InterpolateRectangle<InputImage> |
interpInput |
protected int |
lengthFeature |
protected int |
widthFeature |
Constructor and Description |
---|
KltTracker(InterpolateRectangle<InputImage> interpInput,
InterpolateRectangle<DerivativeImage> interpDeriv,
KltConfig config) |
Modifier and Type | Method and Description |
---|---|
KltConfig |
getConfig() |
boolean |
isFullyInside(float x,
float y)
Returns true if the features is entirely enclosed inside of the image.
|
boolean |
setDescription(KltFeature feature)
Sets the features description using the current image and the location of the feature stored in the feature.
|
void |
setImage(InputImage image,
DerivativeImage derivX,
DerivativeImage derivY)
Sets the current image it should be tracking with.
|
KltTrackFault |
track(KltFeature feature)
Updates the feature's location inside the image.
|
protected InputImage extends ImageSingleBand image
protected DerivativeImage extends ImageSingleBand derivX
protected DerivativeImage extends ImageSingleBand derivY
protected InterpolateRectangle<InputImage extends ImageSingleBand> interpInput
protected InterpolateRectangle<DerivativeImage extends ImageSingleBand> interpDeriv
protected KltConfig config
protected float Gxx
protected float Gyy
protected float Gxy
protected float Ex
protected float Ey
protected int widthFeature
protected int lengthFeature
protected ImageFloat32 descFeature
public KltTracker(InterpolateRectangle<InputImage> interpInput, InterpolateRectangle<DerivativeImage> interpDeriv, KltConfig config)
public void setImage(InputImage image, DerivativeImage derivX, DerivativeImage derivY)
image
- Original input image.derivX
- Image derivative along the x-axisderivY
- Image derivative along the y-axispublic boolean setDescription(KltFeature feature)
feature
- Feature description which is to be set. Location must be specified.public KltTrackFault track(KltFeature feature)
Updates the feature's location inside the image. The feature's position can be modified even if tracking fails.
feature
- Feature being tracked.public boolean isFullyInside(float x, float y)
public KltConfig getConfig()
Copyright © 2011-2012 Peter Abeles