boofcv.alg.feature.associate
Class AssociateStereo2D<Desc extends TupleDesc>
- java.lang.Object
-
- boofcv.alg.feature.associate.StereoConsistencyCheck
-
- boofcv.alg.feature.associate.AssociateStereo2D<Desc>
-
- All Implemented Interfaces:
- Associate, AssociateDescription2D<Desc>
public class AssociateStereo2D<Desc extends TupleDesc> extends StereoConsistencyCheck implements AssociateDescription2D<Desc>
Association for a stereo pair where the source is the left camera and the destination is the right camera. Pixel coordinates are rectified and associations are only considered if the two observations are within tolerance of each other along the y-axis and that the left observation's x-coordinate is greater than the right.
-
-
Constructor Summary
Constructors Constructor and Description AssociateStereo2D(ScoreAssociation<Desc> scorer, double locationTolerance, java.lang.Class<Desc> descType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidassociate()Finds the best match for each item in the source list with an item in the destination list.FastQueue<AssociatedIndex>getMatches()List of associated features.MatchScoreTypegetScoreType()Specifies the type of score which is returned.GrowQueue_I32getUnassociatedDestination()Indexes of features in the destination set which are not associated.GrowQueue_I32getUnassociatedSource()Indexes of features in the source set which are not associated.voidsetDestination(FastQueue<Point2D_F64> location, FastQueue<Desc> descriptions)Converts location into rectified coordinates and saved a reference to the description.voidsetSource(FastQueue<Point2D_F64> location, FastQueue<Desc> descriptions)Converts location into rectified coordinates and saved a reference to the description.voidsetThreshold(double score)Associations are only considered if their score is less than or equal to the specified threshold.booleanuniqueDestination()If at most one match is returned for each destination feature.booleanuniqueSource()If at most one match is returned for each source feature.-
Methods inherited from class boofcv.alg.feature.associate.StereoConsistencyCheck
checkPixel, checkRectified, setCalibration
-
-
-
-
Constructor Detail
-
AssociateStereo2D
public AssociateStereo2D(ScoreAssociation<Desc> scorer, double locationTolerance, java.lang.Class<Desc> descType)
-
-
Method Detail
-
setSource
public void setSource(FastQueue<Point2D_F64> location, FastQueue<Desc> descriptions)
Converts location into rectified coordinates and saved a reference to the description.- Specified by:
setSourcein interfaceAssociateDescription2D<Desc extends TupleDesc>- Parameters:
location- Feature locations.descriptions- Feature descriptions.
-
setDestination
public void setDestination(FastQueue<Point2D_F64> location, FastQueue<Desc> descriptions)
Converts location into rectified coordinates and saved a reference to the description.- Specified by:
setDestinationin interfaceAssociateDescription2D<Desc extends TupleDesc>- Parameters:
location- Feature locations.descriptions- Feature descriptions.
-
associate
public void associate()
Description copied from interface:AssociateFinds the best match for each item in the source list with an item in the destination list.
-
getMatches
public FastQueue<AssociatedIndex> getMatches()
Description copied from interface:AssociateList of associated features. Indexes refer to the index inside the input lists.- Specified by:
getMatchesin interfaceAssociate- Returns:
- List of associated features.
-
getUnassociatedSource
public GrowQueue_I32 getUnassociatedSource()
Description copied from interface:AssociateIndexes of features in the source set which are not associated. WARNING: In some implementations the unassociated list is recomputed each time this function is invoked. In other implementations it was found virtually for free while the matches are found.- Specified by:
getUnassociatedSourcein interfaceAssociate- Returns:
- List of unassociated source features by index.
-
getUnassociatedDestination
public GrowQueue_I32 getUnassociatedDestination()
Description copied from interface:AssociateIndexes of features in the destination set which are not associated. WARNING: In some implementations the unassociated list is recomputed each time this function is invoked. In other implementations it was found virtually for free while the matches are found.- Specified by:
getUnassociatedDestinationin interfaceAssociate- Returns:
- List of unassociated destination features by index.
-
setThreshold
public void setThreshold(double score)
Description copied from interface:AssociateAssociations are only considered if their score is less than or equal to the specified threshold. To remove any threshold test set this value to Double.MAX_VALUE- Specified by:
setThresholdin interfaceAssociate- Parameters:
score- The threshold.
-
getScoreType
public MatchScoreType getScoreType()
Description copied from interface:AssociateSpecifies the type of score which is returned.- Specified by:
getScoreTypein interfaceAssociate- Returns:
- Type of association score.
-
uniqueSource
public boolean uniqueSource()
Description copied from interface:AssociateIf at most one match is returned for each source feature.- Specified by:
uniqueSourcein interfaceAssociate- Returns:
- true for unique source association
-
uniqueDestination
public boolean uniqueDestination()
Description copied from interface:AssociateIf at most one match is returned for each destination feature.- Specified by:
uniqueDestinationin interfaceAssociate- Returns:
- true for unique destination association
-
-
DataMelt 3.0 © DataMelt by jWork.ORG