Class PointTrackerHybrid<I extends ImageGray<I>,D extends ImageGray<D>,Desc extends TupleDesc<Desc>>

java.lang.Object
boofcv.abst.tracker.PointTrackerHybrid<I,D,Desc>
All Implemented Interfaces:
PointTracker<I>

public class PointTrackerHybrid<I extends ImageGray<I>,D extends ImageGray<D>,Desc extends TupleDesc<Desc>> extends Object implements PointTracker<I>
Wrapper around HybridTrackerScalePoint for PointTracker. Features are respawned when the number of active tracks drops below a threshold automatically. This threshold is realtive to the number of tracks spawned previously and is adjusted when the user requests that tracks are dropped.
  • Field Details

    • thresholdRespawn

      public final ConfigLength thresholdRespawn
  • Constructor Details

  • Method Details

    • process

      public void process(I image)
      Description copied from interface: PointTracker
      Process input image and perform tracking.
      Specified by:
      process in interface PointTracker<I extends ImageGray<I>>
      Parameters:
      image - Next image in the sequence
    • dropTracks

      public void dropTracks(PointTracker.Dropper dropper)
      Description copied from interface: PointTracker
      Used to drop multiple tracks using a rule. This can be more efficient than dropping them one at a time.

      NOTE: Tracks dropped using this function will not appear in the dropped list.

      Specified by:
      dropTracks in interface PointTracker<I extends ImageGray<I>>
      Parameters:
      dropper - Rule for dropping the tracks
    • spawnTracks

      public void spawnTracks()
      Description copied from interface: PointTracker
      Automatically selects new features in the image to track. Returned tracks must be unique and not duplicates of any existing tracks. This includes both active and inactive tracks. NOTE: This function may or may not also modify the active and inactive lists.
      Specified by:
      spawnTracks in interface PointTracker<I extends ImageGray<I>>
    • getImageType

      public ImageType<I> getImageType()
      Description copied from interface: PointTracker
      Input image type
      Specified by:
      getImageType in interface PointTracker<I extends ImageGray<I>>
    • reset

      public void reset()
      Description copied from interface: PointTracker
      Discard memory of all current and past tracks. Growing buffered might not be reset to their initial size by this method.
      Specified by:
      reset in interface PointTracker<I extends ImageGray<I>>
    • getFrameID

      public long getFrameID()
      Description copied from interface: PointTracker
      Returns the ID of the most recently processed frame. Frames start at 0 and increment by one each time process is called. After reset or before any frames have been processed -1 is returned.
      Specified by:
      getFrameID in interface PointTracker<I extends ImageGray<I>>
    • getTotalActive

      public int getTotalActive()
      Description copied from interface: PointTracker
      Returns the total number of active tracks
      Specified by:
      getTotalActive in interface PointTracker<I extends ImageGray<I>>
    • getTotalInactive

      public int getTotalInactive()
      Description copied from interface: PointTracker
      Returns total number of inactive tracks
      Specified by:
      getTotalInactive in interface PointTracker<I extends ImageGray<I>>
    • dropAllTracks

      public void dropAllTracks()
      Description copied from interface: PointTracker
      Drops all feature to be dropped and will no longer be tracked.

      NOTE: Tracks dropped using this function will not appear in the dropped list.

      Specified by:
      dropAllTracks in interface PointTracker<I extends ImageGray<I>>
    • getMaxSpawn

      public int getMaxSpawn()
      Description copied from interface: PointTracker
      Returns the maximum total number of tracks that it can spawn in a single frame. This number is reduced by the number of active tracks. So if the maximum number of tracks it can spawn is 200 and 50 tracks are active then it will spawn at most 150 tracks. If there is no limit then a number ≤ 0 is returned.
      Specified by:
      getMaxSpawn in interface PointTracker<I extends ImageGray<I>>
    • dropTrack

      public boolean dropTrack(PointTrack track)
      Description copied from interface: PointTracker
      Manually forces a track to be dropped. New requests to all and active lists will not include the track after it has been dropped using this function. If request is made to drop a track that is not being tracked (in the internal all list), then the request is ignored.

      NOTE: Tracks dropped using this function will not appear in the dropped list.

      Specified by:
      dropTrack in interface PointTracker<I extends ImageGray<I>>
      Parameters:
      track - The track which is to be dropped
      Returns:
      true if the request to drop the track was done or if it was ignored because the track wasn't being tracked
    • getAllTracks

      public List<PointTrack> getAllTracks(@Nullable @Nullable List<PointTrack> list)
      Description copied from interface: PointTracker
      Returns a list of all features that are currently being tracked
      Specified by:
      getAllTracks in interface PointTracker<I extends ImageGray<I>>
      Parameters:
      list - Optional storage for the list of tracks. List is cleared before tracks are added. If null a new list will be declared internally.
      Returns:
      List of tracks.
    • getActiveTracks

      public List<PointTrack> getActiveTracks(@Nullable @Nullable List<PointTrack> list)
      Description copied from interface: PointTracker
      Returns a list of active tracks. An active track is defined as a track which was found in the most recently processed image.
      Specified by:
      getActiveTracks in interface PointTracker<I extends ImageGray<I>>
      Parameters:
      list - Optional storage for the list of tracks. List is cleared before tracks are added. If null a new list will be declared internally.
      Returns:
      List of tracks.
    • getInactiveTracks

      public List<PointTrack> getInactiveTracks(@Nullable @Nullable List<PointTrack> list)
      Description copied from interface: PointTracker
      Returns a list of inactive tracks. A track is inactive if it is not associated with any features in the current image.
      Specified by:
      getInactiveTracks in interface PointTracker<I extends ImageGray<I>>
      Parameters:
      list - Optional storage for the list of tracks. List is cleared before tracks are added. If null a new list will be declared internally.
      Returns:
      List of tracks.
    • getDroppedTracks

      public List<PointTrack> getDroppedTracks(@Nullable @Nullable List<PointTrack> list)
      Description copied from interface: PointTracker
      Returns a list of tracks dropped by the tracker during the most recent update. Tracks dropped by user request are not included in this list.
      Specified by:
      getDroppedTracks in interface PointTracker<I extends ImageGray<I>>
      Parameters:
      list - Optional storage for the list of tracks. List is cleared before tracks are added. If null a new list will be declared internally.
      Returns:
      List of tracks.
    • getNewTracks

      public List<PointTrack> getNewTracks(@Nullable @Nullable List<PointTrack> list)
      Description copied from interface: PointTracker
      Returns a list of tracks that have been added since process was called.
      Specified by:
      getNewTracks in interface PointTracker<I extends ImageGray<I>>
      Parameters:
      list - Optional storage for the list of tracks. List is cleared before tracks are added. If null a new list will be declared internally.
      Returns:
      List of tracks.