public interface PointTracker<T extends ImageBase>
Interface for tracking point features in image sequences with automatic feature selection for use in Structure From Motion (SFM) application. Access is provided to the pixel location of each track. Implementation specific track information is hidden from the user.
Each track can have the following states, active, inactive, new, and dropped. An active track is one which was recently updated in the latest image, while an inactive one was not. New tracks were spawned in the most recent image. Dropped tracks are tracks which were automatically dropped in the most recent update.
TRACK MAINTENANCE: Implementations of this interface should not automatically drop tracks or perform other forms of track maintenance unless the feature is hopelessly lost and can no longer be tracked. It is the responsibility of the user to drop tracks which are inactive for an excessive amount of time. New tracks should never be spawned unless specifically requested by the user.
TRACK MEMORY: Implementations of this interface must recycle tracks. After a track has been dropped, either by the user or automatically, the reference should be saved and the user provided cookie left unmodified. When a new track is added the track information should be updated and the cookie left unmodified again. The intended purpose of this requirement is to reduce the burden of memory maintenance on the user and to encourage good memory management.
NOTE: Tracks dropped by the user will not be included in the dropped list.
Modifier and Type | Method and Description |
---|---|
void |
dropAllTracks()
Drops all feature to be dropped and will no longer be tracked.
|
boolean |
dropTrack(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 tracked
|
java.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.
|
void |
process(T image)
Process input image and perform tracking.
|
void |
reset()
Discard memory of all current and past tracks.
|
void |
spawnTracks()
Automatically selects new features in the image to track.
|
void process(T image)
image
- Next image in the sequencevoid reset()
void dropAllTracks()
boolean dropTrack(PointTrack track)
track
- The track which is to be droppedjava.util.List<PointTrack> getAllTracks(java.util.List<PointTrack> list)
list
- Optional storage for the list of tracks.
If null a new list will be declared internally.java.util.List<PointTrack> getActiveTracks(java.util.List<PointTrack> list)
list
- Optional storage for the list of tracks.
If null a new list will be declared internally.java.util.List<PointTrack> getInactiveTracks(java.util.List<PointTrack> list)
list
- Optional storage for the list of tracks.
If null a new list will be declared internally.java.util.List<PointTrack> getDroppedTracks(java.util.List<PointTrack> list)
list
- Optional storage for the list of tracks.
If null a new list will be declared internally.java.util.List<PointTrack> getNewTracks(java.util.List<PointTrack> list)
list
- Optional storage for the list of tracks.
If null a new list will be declared internally.void spawnTracks()
Copyright © 2011-2012 Peter Abeles