Class PruneCloseTracks<T>

java.lang.Object
boofcv.alg.tracker.PruneCloseTracks<T>

public class PruneCloseTracks<T>
extends Object
Detects if tracks are too close together and discards some of the close ones. Tracks are projected into a smaller grid (specified by scale) and if more than one lands on the same grid element it is pruned. An ambiguity resolver is used to decide which track to keep if there's a conflict. If the resolver says they are equivalent then featureID is used. Results should be consistent independent of order in tracks list. This is designed to work with different types of track data structures.
  • Constructor Details

  • Method Details

    • init

      public void init​(int imgWidth, int imgHeight)
      Initializes data structures for the specified input image size
    • process

      public void process​(List<T> tracks, List<T> dropTracks)
      Processes existing tracks and adds tracks to drop list if they are too close to other tracks and considered less desirable
      Parameters:
      tracks - (Input) List of tracks. Not modified.
      dropTracks - (Output) List of tracks that need to be dropped by the tracker
    • prunePointTrack

      public static PruneCloseTracks<PointTrack> prunePointTrack​(int radius)
      Convenience function for creating a variant for PointTrack