Package boofcv.alg.feature.associate
Class AssociateStereo2D<Desc extends TupleDesc<Desc>>
java.lang.Object
boofcv.alg.feature.associate.StereoConsistencyCheck
boofcv.alg.feature.associate.AssociateStereo2D<Desc>
- All Implemented Interfaces:
Associate<Desc>
,AssociateDescription2D<Desc>
public class AssociateStereo2D<Desc extends TupleDesc<Desc>>
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.
-
Field Summary
Fields inherited from class boofcv.alg.feature.associate.StereoConsistencyCheck
leftImageToRect, rightImageToRect
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Finds the best match for each item in the source list with an item in the destination list.Returns the type of object it can associateList of associated features.Specifies the type of score which is returned.Indexes of features in the destination set which are not associated.Indexes of features in the source set which are not associated.void
initialize
(int imageWidth, int imageHeight) Initialize by specifying the image width/height.void
setDestination
(FastAccess<Point2D_F64> location, FastAccess<Desc> descriptions) Converts location into rectified coordinates and saved a reference to the description.void
setMaxScoreThreshold
(double score) Associations are only considered if their score is less than or equal to the specified threshold.void
setSource
(FastAccess<Point2D_F64> location, FastAccess<Desc> descriptions) Converts location into rectified coordinates and saved a reference to the description.boolean
If at most one match is returned for each destination feature.boolean
If at most one match is returned for each source feature.Methods inherited from class boofcv.alg.feature.associate.StereoConsistencyCheck
checkPixel, checkRectified, setCalibration
-
Constructor Details
-
AssociateStereo2D
-
-
Method Details
-
initialize
public void initialize(int imageWidth, int imageHeight) Description copied from interface:AssociateDescription2D
Initialize by specifying the image width/height. Used to precompute internal data structures and set thresholds. If images are different sizes just use the largest width/height- Specified by:
initialize
in interfaceAssociateDescription2D<Desc extends TupleDesc<Desc>>
- Parameters:
imageWidth
- Input image widthimageHeight
- Input image height
-
setSource
Converts location into rectified coordinates and saved a reference to the description.- Specified by:
setSource
in interfaceAssociateDescription2D<Desc extends TupleDesc<Desc>>
- Parameters:
location
- Feature locations.descriptions
- Feature descriptions.
-
setDestination
Converts location into rectified coordinates and saved a reference to the description.- Specified by:
setDestination
in interfaceAssociateDescription2D<Desc extends TupleDesc<Desc>>
- Parameters:
location
- Feature locations.descriptions
- Feature descriptions.
-
getDescriptionType
Description copied from interface:Associate
Returns the type of object it can associate- Specified by:
getDescriptionType
in interfaceAssociate<Desc extends TupleDesc<Desc>>
-
associate
public void associate()Description copied from interface:Associate
Finds the best match for each item in the source list with an item in the destination list. -
getMatches
Description copied from interface:Associate
List of associated features. Indexes refer to the index inside the input lists.- Specified by:
getMatches
in interfaceAssociate<Desc extends TupleDesc<Desc>>
- Returns:
- List of associated features.
-
getUnassociatedSource
Description copied from interface:Associate
Indexes 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:
getUnassociatedSource
in interfaceAssociate<Desc extends TupleDesc<Desc>>
- Returns:
- List of unassociated source features by index.
-
getUnassociatedDestination
Description copied from interface:Associate
Indexes 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:
getUnassociatedDestination
in interfaceAssociate<Desc extends TupleDesc<Desc>>
- Returns:
- List of unassociated destination features by index.
-
setMaxScoreThreshold
public void setMaxScoreThreshold(double score) Description copied from interface:Associate
Associations 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:
setMaxScoreThreshold
in interfaceAssociate<Desc extends TupleDesc<Desc>>
- Parameters:
score
- The threshold.
-
getScoreType
Description copied from interface:Associate
Specifies the type of score which is returned.- Specified by:
getScoreType
in interfaceAssociate<Desc extends TupleDesc<Desc>>
- Returns:
- Type of association score.
-
uniqueSource
public boolean uniqueSource()Description copied from interface:Associate
If at most one match is returned for each source feature.- Specified by:
uniqueSource
in interfaceAssociate<Desc extends TupleDesc<Desc>>
- Returns:
- true for unique source association
-
uniqueDestination
public boolean uniqueDestination()Description copied from interface:Associate
If at most one match is returned for each destination feature.- Specified by:
uniqueDestination
in interfaceAssociate<Desc extends TupleDesc<Desc>>
- Returns:
- true for unique destination association
-