boofcv.abst.feature.tracker
Class PointTrackerToTwoPass<T extends ImageBase>
- java.lang.Object
-
- boofcv.abst.feature.tracker.PointTrackerToTwoPass<T>
-
- All Implemented Interfaces:
- PointTracker<T>, PointTrackerTwoPass<T>
public class PointTrackerToTwoPass<T extends ImageBase> extends java.lang.Object implements PointTrackerTwoPass<T>
Wrapper class that allowsPointTrackerto be used as aPointTrackerTwoPass. SincePointTrackdoes not have all the same capabilities ofPointTrackerTwoPassnot all operations are supported or behave in exactly the same way. Use of this interface is only appropriate when a two pass tracker is being used as a regular point tracker.
-
-
Constructor Summary
Constructors Constructor and Description PointTrackerToTwoPass(PointTracker<T> tracker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddropAllTracks()Drops all feature to be dropped and will no longer be tracked.booleandropTrack(PointTrack track)Manually forces a track to be dropped.voidfinishTracking()Finishes tracking and updates the track's description, updates inactive and drop track lists.java.util.List<PointTrack>getActiveTracks(java.util.List<PointTrack> list)Returns a list of active tracks.java.util.List<PointTrack>getAllTracks(java.util.List<PointTrack> list)Returns a list of all features that are currently being trackedjava.util.List<PointTrack>getDroppedTracks(java.util.List<PointTrack> list)Returns a list of tracks dropped by the tracker during the most recent update.java.util.List<PointTrack>getInactiveTracks(java.util.List<PointTrack> list)Returns a list of inactive tracks.java.util.List<PointTrack>getNewTracks(java.util.List<PointTrack> list)Returns a list of tracks that have been added since process was called.voidperformSecondPass()Updates spacial information for each track and active list.voidprocess(T image)Changes behavior ofPointTracker.process(boofcv.struct.image.ImageBase)in that it will only update each track's location, but not its description, and the active list.voidreset()Discard memory of all current and past tracks.voidsetHint(double pixelX, double pixelY, PointTrack track)Provides a hint for where thevoidspawnTracks()Automatically selects new features in the image to track.
-
-
-
Constructor Detail
-
PointTrackerToTwoPass
public PointTrackerToTwoPass(PointTracker<T> tracker)
-
-
Method Detail
-
process
public void process(T image)
Description copied from interface:PointTrackerTwoPassChanges behavior ofPointTracker.process(boofcv.struct.image.ImageBase)in that it will only update each track's location, but not its description, and the active list. CallPointTrackerTwoPass.finishTracking()to update the track's description, the inactive list, and the dropped list. An exception is thrown if multiple calls to this function are made without callingPointTrackerTwoPass.finishTracking().- Specified by:
processin interfacePointTracker<T extends ImageBase>- Specified by:
processin interfacePointTrackerTwoPass<T extends ImageBase>- Parameters:
image- Next image in the sequence
-
reset
public void reset()
Description copied from interface:PointTrackerDiscard memory of all current and past tracks. Growing buffered might not be reset to their initial size by this method.- Specified by:
resetin interfacePointTracker<T extends ImageBase>
-
dropAllTracks
public void dropAllTracks()
Description copied from interface:PointTrackerDrops all feature to be dropped and will no longer be tracked. Tracks dropped using this function will not appear in the dropped list.- Specified by:
dropAllTracksin interfacePointTracker<T extends ImageBase>
-
dropTrack
public boolean dropTrack(PointTrack track)
Description copied from interface:PointTrackerManually forces a track to be dropped. Tracks dropped using this function will not appear in the dropped list and their data is subject to being immediately recycled. 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.- Specified by:
dropTrackin interfacePointTracker<T extends ImageBase>- 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 java.util.List<PointTrack> getAllTracks(java.util.List<PointTrack> list)
Description copied from interface:PointTrackerReturns a list of all features that are currently being tracked- Specified by:
getAllTracksin interfacePointTracker<T extends ImageBase>- Parameters:
list- Optional storage for the list of tracks. If null a new list will be declared internally.- Returns:
- List of tracks.
-
getActiveTracks
public java.util.List<PointTrack> getActiveTracks(java.util.List<PointTrack> list)
Description copied from interface:PointTrackerReturns a list of active tracks. An active track is defined as a track which was found in the most recently processed image.- Specified by:
getActiveTracksin interfacePointTracker<T extends ImageBase>- Parameters:
list- Optional storage for the list of tracks. If null a new list will be declared internally.- Returns:
- List of tracks.
-
getInactiveTracks
public java.util.List<PointTrack> getInactiveTracks(java.util.List<PointTrack> list)
Description copied from interface:PointTrackerReturns a list of inactive tracks. A track is inactive if it is not associated with any features in the current image.- Specified by:
getInactiveTracksin interfacePointTracker<T extends ImageBase>- Parameters:
list- Optional storage for the list of tracks. If null a new list will be declared internally.- Returns:
- List of tracks.
-
getDroppedTracks
public java.util.List<PointTrack> getDroppedTracks(java.util.List<PointTrack> list)
Description copied from interface:PointTrackerReturns 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:
getDroppedTracksin interfacePointTracker<T extends ImageBase>- Parameters:
list- Optional storage for the list of tracks. If null a new list will be declared internally.- Returns:
- List of tracks.
-
getNewTracks
public java.util.List<PointTrack> getNewTracks(java.util.List<PointTrack> list)
Description copied from interface:PointTrackerReturns a list of tracks that have been added since process was called.- Specified by:
getNewTracksin interfacePointTracker<T extends ImageBase>- Parameters:
list- Optional storage for the list of tracks. If null a new list will be declared internally.- Returns:
- List of tracks.
-
spawnTracks
public void spawnTracks()
Description copied from interface:PointTrackerAutomatically 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:
spawnTracksin interfacePointTracker<T extends ImageBase>
-
performSecondPass
public void performSecondPass()
Description copied from interface:PointTrackerTwoPassUpdates spacial information for each track and active list. Does not change the track description or any other lists. Can be called multiple times.- Specified by:
performSecondPassin interfacePointTrackerTwoPass<T extends ImageBase>
-
finishTracking
public void finishTracking()
Description copied from interface:PointTrackerTwoPassFinishes tracking and updates the track's description, updates inactive and drop track lists.- Specified by:
finishTrackingin interfacePointTrackerTwoPass<T extends ImageBase>
-
setHint
public void setHint(double pixelX, double pixelY, PointTrack track)Description copied from interface:PointTrackerTwoPassProvides a hint for where the- Specified by:
setHintin interfacePointTrackerTwoPass<T extends ImageBase>- Parameters:
pixelX- x-coordinate hint for where the track is in the imagepixelY- y-coordinate hint for where the track is in the imagetrack- The track for which the hint is being provided for
-
-
DataMelt 3.0 © DataMelt by jWork.ORG