public class DetectDescribeAssociate<I extends boofcv.struct.image.ImageGray<I>,Desc extends boofcv.struct.feature.TupleDesc> extends java.lang.Object implements PointTracker<I>
Base class for detect-describe-associate type trackers. Tracker works by detecting features in each image, computing a descriptor for each feature, then associating the features together.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DetectDescribeAssociate.SetTrackInfo<Desc> |
| Modifier and Type | Field and Description |
|---|---|
protected boofcv.abst.feature.associate.AssociateDescription2D<Desc> |
associate |
protected long |
featureID |
protected DdaFeatureManager<I,Desc> |
manager |
protected DetectDescribeAssociate.SetTrackInfo[] |
sets |
protected java.util.List<PointTrack> |
tracksActive |
protected java.util.List<PointTrack> |
tracksAll |
protected java.util.List<PointTrack> |
tracksDropped |
protected java.util.List<PointTrack> |
tracksInactive |
protected java.util.List<PointTrack> |
tracksNew |
protected java.util.List<PointTrack> |
unused |
| Modifier | Constructor and Description |
|---|---|
protected |
DetectDescribeAssociate() |
|
DetectDescribeAssociate(DdaFeatureManager<I,Desc> manager,
boofcv.abst.feature.associate.AssociateDescription2D<Desc> associate,
boolean updateDescription)
Configures tracker
|
| Modifier and Type | Method and Description |
|---|---|
protected PointTrack |
addNewTrack(int setIndex,
double x,
double y,
Desc desc)
Adds a new track given its location and description
|
protected boolean |
checkValidSpawn(int setIndex,
PointTrack p)
Returns true if a new track can be spawned here.
|
void |
dropAllTracks()
Drops all feature to be dropped and will no longer be tracked.
|
boolean |
dropTrack(PointTrack track)
Remove from active list and mark so that it is dropped in the next cycle
|
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.
|
protected PointTrack |
getUnused()
Returns an unused track.
|
boolean |
isUpdateDescription() |
protected void |
performTracking(DetectDescribeAssociate.SetTrackInfo<Desc> info) |
void |
process(I input)
Process input image and perform tracking.
|
protected void |
putIntoSrcList(DetectDescribeAssociate.SetTrackInfo<Desc> info)
Put existing tracks into source list for association
|
void |
reset()
Discard memory of all current and past tracks.
|
void |
setUpdateDescription(boolean updateDescription)
If a feature is associated should the description be updated with the latest observation?
|
void |
spawnTracks()
Takes the current crop of detected features and makes them the keyframe
|
protected void |
updateTrackState(DetectDescribeAssociate.SetTrackInfo<Desc> info)
Update each track's location and description (if configured to do so) mark tracks as being associated.
|
protected boofcv.abst.feature.associate.AssociateDescription2D<Desc extends boofcv.struct.feature.TupleDesc> associate
protected DdaFeatureManager<I extends boofcv.struct.image.ImageGray<I>,Desc extends boofcv.struct.feature.TupleDesc> manager
protected DetectDescribeAssociate.SetTrackInfo[] sets
protected java.util.List<PointTrack> tracksAll
protected java.util.List<PointTrack> tracksActive
protected java.util.List<PointTrack> tracksInactive
protected java.util.List<PointTrack> tracksDropped
protected java.util.List<PointTrack> tracksNew
protected java.util.List<PointTrack> unused
protected long featureID
public DetectDescribeAssociate(DdaFeatureManager<I,Desc> manager, boofcv.abst.feature.associate.AssociateDescription2D<Desc> associate, boolean updateDescription)
associate - AssociationupdateDescription - If true then the feature description will be updated after each image.
Typically this should be false.protected DetectDescribeAssociate()
public boolean isUpdateDescription()
public void setUpdateDescription(boolean updateDescription)
public void reset()
PointTrackerreset in interface PointTracker<I extends boofcv.struct.image.ImageGray<I>>public void process(I input)
PointTrackerprocess in interface PointTracker<I extends boofcv.struct.image.ImageGray<I>>input - Next image in the sequenceprotected void performTracking(DetectDescribeAssociate.SetTrackInfo<Desc> info)
protected void putIntoSrcList(DetectDescribeAssociate.SetTrackInfo<Desc> info)
protected void updateTrackState(DetectDescribeAssociate.SetTrackInfo<Desc> info)
public void spawnTracks()
spawnTracks in interface PointTracker<I extends boofcv.struct.image.ImageGray<I>>protected PointTrack addNewTrack(int setIndex, double x, double y, Desc desc)
protected boolean checkValidSpawn(int setIndex,
PointTrack p)
protected PointTrack getUnused()
public void dropAllTracks()
PointTrackerdropAllTracks in interface PointTracker<I extends boofcv.struct.image.ImageGray<I>>public boolean dropTrack(PointTrack track)
dropTrack in interface PointTracker<I extends boofcv.struct.image.ImageGray<I>>track - The track which is to be droppedpublic java.util.List<PointTrack> getActiveTracks(java.util.List<PointTrack> list)
PointTrackergetActiveTracks in interface PointTracker<I extends boofcv.struct.image.ImageGray<I>>list - Optional storage for the list of tracks.
If null a new list will be declared internally.public java.util.List<PointTrack> getDroppedTracks(java.util.List<PointTrack> list)
PointTrackergetDroppedTracks in interface PointTracker<I extends boofcv.struct.image.ImageGray<I>>list - Optional storage for the list of tracks.
If null a new list will be declared internally.public java.util.List<PointTrack> getNewTracks(java.util.List<PointTrack> list)
PointTrackergetNewTracks in interface PointTracker<I extends boofcv.struct.image.ImageGray<I>>list - Optional storage for the list of tracks.
If null a new list will be declared internally.public java.util.List<PointTrack> getAllTracks(java.util.List<PointTrack> list)
PointTrackergetAllTracks in interface PointTracker<I extends boofcv.struct.image.ImageGray<I>>list - Optional storage for the list of tracks.
If null a new list will be declared internally.public java.util.List<PointTrack> getInactiveTracks(java.util.List<PointTrack> list)
PointTrackergetInactiveTracks in interface PointTracker<I extends boofcv.struct.image.ImageGray<I>>list - Optional storage for the list of tracks.
If null a new list will be declared internally.