public class DetectDescribeAssociate<I extends boofcv.struct.image.ImageGray,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 | Field and Description |
|---|---|
protected boofcv.abst.feature.associate.AssociateDescription2D<Desc> |
associate |
protected org.ddogleg.struct.FastQueue<Desc> |
featDst |
protected org.ddogleg.struct.FastQueue<Desc> |
featSrc |
protected long |
featureID |
protected boolean[] |
isAssociated |
protected org.ddogleg.struct.FastQueue<georegression.struct.point.Point2D_F64> |
locDst |
protected org.ddogleg.struct.FastQueue<georegression.struct.point.Point2D_F64> |
locSrc |
protected DdaFeatureManager<I,Desc> |
manager |
protected org.ddogleg.struct.FastQueue<boofcv.struct.feature.AssociatedIndex> |
matches |
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(double x,
double y,
Desc desc)
Adds a new track given its location and description
|
protected boolean |
checkValidSpawn(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() |
void |
process(I input)
Process input image and perform tracking.
|
protected void |
putIntoSrcList()
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(org.ddogleg.struct.FastQueue<boofcv.struct.feature.AssociatedIndex> matches)
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,Desc extends boofcv.struct.feature.TupleDesc> manager
protected org.ddogleg.struct.FastQueue<georegression.struct.point.Point2D_F64> locDst
protected org.ddogleg.struct.FastQueue<georegression.struct.point.Point2D_F64> locSrc
protected org.ddogleg.struct.FastQueue<Desc extends boofcv.struct.feature.TupleDesc> featSrc
protected org.ddogleg.struct.FastQueue<Desc extends boofcv.struct.feature.TupleDesc> featDst
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 org.ddogleg.struct.FastQueue<boofcv.struct.feature.AssociatedIndex> matches
protected long featureID
protected boolean[] isAssociated
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>public void process(I input)
PointTrackerprocess in interface PointTracker<I extends boofcv.struct.image.ImageGray>input - Next image in the sequenceprotected void performTracking()
protected void putIntoSrcList()
protected void updateTrackState(org.ddogleg.struct.FastQueue<boofcv.struct.feature.AssociatedIndex> matches)
public void spawnTracks()
spawnTracks in interface PointTracker<I extends boofcv.struct.image.ImageGray>protected PointTrack addNewTrack(double x, double y, Desc desc)
protected boolean checkValidSpawn(PointTrack p)
protected PointTrack getUnused()
public void dropAllTracks()
PointTrackerdropAllTracks in interface PointTracker<I extends boofcv.struct.image.ImageGray>public boolean dropTrack(PointTrack track)
dropTrack in interface PointTracker<I extends boofcv.struct.image.ImageGray>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>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>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>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>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>list - Optional storage for the list of tracks.
If null a new list will be declared internally.