- java.lang.Object
-
- boofcv.alg.tracker.tld.TldRegionTracker<Image,Derivative>
-
public class TldRegionTracker<Image extends ImageGray,Derivative extends ImageGray> extends java.lang.ObjectTracks features inside target's rectangle using pyramidal KLT and updates the rectangle using found motion. A scale and translation model model is used. A major departure from the paper is that KLT forward-backward (FB) error and robust model fitting is used to prune tracks and estimate motion. In the paper FB and NCC error is used to prune tracks and a (in my opinion) hack is used by computing median error values. The way the motion is computed is more mathematically sound this way. NCC would provide a good sanity check, but is probably not needed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classTldRegionTracker.Track
-
Constructor Summary
Constructors Constructor and Description TldRegionTracker(int gridWidth, int featureRadius, double maxErrorFB, ImageGradient<Image,Derivative> gradient, PyramidKltTracker<Image,Derivative> tracker, java.lang.Class<Image> imageType, java.lang.Class<Derivative> derivType)Configures tracker
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description FastQueue<AssociatedPair>getPairs()TldRegionTracker.Track[]getTracks()voidinitialize(PyramidDiscrete<Image> image)Call for the first image being trackedbooleanprocess(ImagePyramid<Image> image, Rectangle2D_F64 targetRectangle)Creates several tracks inside the target rectangle and compuets their motion
-
-
-
Constructor Detail
-
TldRegionTracker
public TldRegionTracker(int gridWidth, int featureRadius, double maxErrorFB, ImageGradient<Image,Derivative> gradient, PyramidKltTracker<Image,Derivative> tracker, java.lang.Class<Image> imageType, java.lang.Class<Derivative> derivType)Configures tracker- Parameters:
gridWidth- Number of tracks spawned along a side in the grid. Try 10featureRadius- Radius of KLT features being tracked. Try 5maxErrorFB- Maximum allowed forwards-backwards errorgradient- Computes image gradient used by KLT trackertracker- Feature trackerimageType- Type of input imagederivType- Type of derivative image
-
-
Method Detail
-
initialize
public void initialize(PyramidDiscrete<Image> image)
Call for the first image being tracked- Parameters:
image- Most recent video image.
-
process
public boolean process(ImagePyramid<Image> image, Rectangle2D_F64 targetRectangle)
Creates several tracks inside the target rectangle and compuets their motion- Parameters:
image- Most recent video image.targetRectangle- Location of target in previous frame. Not modified.- Returns:
- true if tracking was successful or false if not
-
getPairs
public FastQueue<AssociatedPair> getPairs()
-
getTracks
public TldRegionTracker.Track[] getTracks()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG