Package boofcv.alg.tracker
Class PruneCloseTracks<T>
java.lang.Object
boofcv.alg.tracker.PruneCloseTracks<T>
Detects if tracks are too close together and discards some of the close ones. Tracks are projected into
a smaller grid (specified by scale) and if more than one lands on the same grid element it is pruned. An ambiguity
resolver is used to decide which track to keep if there's a conflict. If the resolver says they are equivalent
then featureID is used. Results should be consistent independent of order in tracks list.
This is designed to work with different types of track data structures.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
static interface
Interface which allows multiple track data structures be passed in -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
init
(int imgWidth, int imgHeight) Initializes data structures for the specified input image sizevoid
Processes existing tracks and adds tracks to drop list if they are too close to other tracks and considered less desirablestatic PruneCloseTracks<PointTrack>
prunePointTrack
(int radius) Convenience function for creating a variant for PointTrack
-
Constructor Details
-
PruneCloseTracks
-
-
Method Details
-
init
public void init(int imgWidth, int imgHeight) Initializes data structures for the specified input image size -
process
Processes existing tracks and adds tracks to drop list if they are too close to other tracks and considered less desirable- Parameters:
tracks
- (Input) List of tracks. Not modified.dropTracks
- (Output) List of tracks that need to be dropped by the tracker
-
prunePointTrack
Convenience function for creating a variant for PointTrack
-