Documentation of 'boofcv.alg.tracker.tld.TldTracker' Java class
TldTracker
boofcv.alg.tracker.tld

Class TldTracker<T extends ImageGray,D extends ImageGray>



  • public class TldTracker<T extends ImageGray,D extends ImageGray>
    extends java.lang.Object

    Main class for Tracking-Learning-Detection (TLD) [1] (a.k.a Predator) object tracker for video sequences. TLD tracks an object which is specified by a user using a rectangle. The description of the object is dynamically updated using P and N constraints.

    To start tracking initialize(ImageGray, int, int, int, int) must first be called to specify the region being tracked. Then each time a new image in the sequences arrives track(ImageGray) is called. Be sure to check its return value to see if tracking was successful or not. If tracking fails one frame it can recover. This is often the case where an object becomes obscured and then visible again.

    NOTE: This implementation is based the description found in [1]. The spirit of the original algorithm is replicated, but there are a several algorithmic changes. The most significant modifications are as follow; 1) The KLT tracker used to update the rectangle does not use NCC features to validate a track or the median based outlier removal. Instead a robust model matching algorithm finds the best fit motion. 2) The non-maximum suppression algorithm has been changed so that it computes a more accurate local maximum and only uses local rectangles to compute the average response. 3) Fern selection is done by selecting the N best using a likelihood ratio conditional on the current image. 4) Learning only happens when a track is considered strong. See code for more details. Note, this is not a port of the OpenTLD project.

    [1] Zdenek Kalal, "Tracking-Learning-Detection" University of Surrey, April 2011 Phd Thesis.

    • Constructor Detail

      • TldTracker

        public TldTracker(TldParameters config,
                          InterpolatePixelS<T> interpolate,
                          ImageGradient<T,D> gradient,
                          java.lang.Class<T> imageType,
                          java.lang.Class<D> derivType)
        Configures the TLD tracker
        Parameters:
        config - Configuration class which specifies the tracker's behavior
    • Method Detail

      • initialize

        public void initialize(T image,
                               int x0,
                               int y0,
                               int x1,
                               int y1)
        Starts tracking the rectangular region.
        Parameters:
        image - First image in the sequence.
        x0 - Top-left corner of rectangle. x-axis
        y0 - Top-left corner of rectangle. y-axis
        x1 - Bottom-right corner of rectangle. x-axis
        y1 - Bottom-right corner of rectangle. y-axis
      • track

        public boolean track(T image)
        Updates track region.
        Parameters:
        image - Next image in the sequence.
        Returns:
        true if the object could be found and false if not
      • selectPyramidScale

        public static int[] selectPyramidScale(int imageWidth,
                                               int imageHeight,
                                               int minSize)
        Selects the scale for the image pyramid based on image size and feature size
        Returns:
        scales for image pyramid
      • isPerformLearning

        public boolean isPerformLearning()
      • setPerformLearning

        public void setPerformLearning(boolean performLearning)
      • getTargetRegion

        public Rectangle2D_F64 getTargetRegion()
        Returns the estimated location of the target in the current image
        Returns:
        Location of the target

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.