- java.lang.Object
-
- boofcv.abst.feature.tracker.PointTrackerKltPyramid<I,D>
-
- All Implemented Interfaces:
- PointTracker<I>
- Direct Known Subclasses:
- PointTrackerTwoPassKltPyramid
public class PointTrackerKltPyramid<I extends ImageGray,D extends ImageGray> extends java.lang.Object implements PointTracker<I>
Wrapper aroundPyramidKltTrackerforPointTracker. Every track will have the same size and shaped descriptor. If any fault is encountered the track will be dropped.
-
-
Constructor Summary
Constructors Constructor and Description PointTrackerKltPyramid(KltConfig config, int templateRadius, PyramidDiscrete<I> pyramid, GeneralFeatureDetector<I,D> detector, ImageGradient<I,D> gradient, InterpolateRectangle<I> interpInput, InterpolateRectangle<D> interpDeriv, java.lang.Class<D> derivType)Constructor which specified the KLT track manager and how the image pyramids are computed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description PointTrackaddTrack(double x, double y)Creates a new feature track at the specified location.voiddropAllTracks()Drops all feature to be dropped and will no longer be tracked.booleandropTrack(PointTrack track)Manually forces a track to be dropped.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)KLT does not have inactive tracks since all tracks are dropped if a problem occurs.java.util.List<PointTrack>getNewTracks(java.util.List<PointTrack> list)Returns a list of tracks that have been added since process was called.voidprocess(I image)Process input image and perform tracking.voidreset()Discard memory of all current and past tracks.voidspawnTracks()Automatically selects new features in the image to track.
-
-
-
Constructor Detail
-
PointTrackerKltPyramid
public PointTrackerKltPyramid(KltConfig config, int templateRadius, PyramidDiscrete<I> pyramid, GeneralFeatureDetector<I,D> detector, ImageGradient<I,D> gradient, InterpolateRectangle<I> interpInput, InterpolateRectangle<D> interpDeriv, java.lang.Class<D> derivType)
Constructor which specified the KLT track manager and how the image pyramids are computed.- Parameters:
config- KLT tracker configurationtemplateRadius- Radius of square templates that are trackedpyramid- The image pyramid which KLT is tracking inside ofdetector- Feature detector. If null then no feature detector will be available and spawn won't work.gradient- Computes gradient image pyramid.interpInput- Interpolation used on input imageinterpDeriv- Interpolation used on gradient imagesderivType- Type of image the gradient is
-
-
Method Detail
-
addTrack
public PointTrack addTrack(double x, double y)
Creates a new feature track at the specified location. Must only be called afterprocess(ImageGray)has been called. It can fail if there is insufficient texture- Parameters:
x- x-coordinatey- y-coordinate- Returns:
- the new track if successful or null if no new track could be created
-
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<I extends ImageGray>
-
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<I extends ImageGray>
-
process
public void process(I image)
Description copied from interface:PointTrackerProcess input image and perform tracking.- Specified by:
processin interfacePointTracker<I extends ImageGray>- Parameters:
image- Next image in the sequence
-
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<I extends ImageGray>- 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
-
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<I extends ImageGray>- 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)
KLT does not have inactive tracks since all tracks are dropped if a problem occurs.- Specified by:
getInactiveTracksin interfacePointTracker<I extends ImageGray>- 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<I extends ImageGray>- 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<I extends ImageGray>- Parameters:
list- Optional storage for the list of tracks. If null a new list will be declared internally.- Returns:
- List of tracks.
-
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<I extends ImageGray>- Parameters:
list- Optional storage for the list of tracks. If null a new list will be declared internally.- Returns:
- List of tracks.
-
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<I extends ImageGray>
-
-
DataMelt 3.0 © DataMelt by jWork.ORG