Class AssociateNearestNeighbor_ST<D>
- All Implemented Interfaces:
Associate<D>
,AssociateDescription<D>
Matches features using a NearestNeighbor
search from DDogleg. The source features are processed
as a lump using NearestNeighbor.setPoints(java.util.List, boolean)
while destination features
are matched one at time using NearestNeighbor.Search.findNearest(Object, double, org.ddogleg.nn.NnData)
.
Typically the processing of source features is more expensive and should be minimized while looking up
destination features is fast. Multiple matches for source features are possible while there will only
be a unique match for each destination feature.
An optional ratio test inspired from [1] can be used. The ratio between the best and second best score is found. if the difference is significant enough then the match is accepted. This this is a ratio test, knowing if the score is squared is important. Please set the flag correctly. Almost always the score is Euclidean distance squared.
[1] Lowe, David G. "Distinctive image features from scale-invariant keypoints." International journal of computer vision 60.2 (2004): 91-110.
-
Field Summary
Fields inherited from class boofcv.alg.feature.associate.AssociateNearestNeighbor
matchesAll
-
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 associatevoid
setDestination
(FastAccess<D> listDst) Sets the list of destination features NOTE: A reference to the input list might be saved internally until the next call to this function.void
setSource
(FastAccess<D> listSrc) Sets the list of source features.Methods inherited from class boofcv.alg.feature.associate.AssociateNearestNeighbor
getMatches, getScoreRatioThreshold, getScoreType, getUnassociatedDestination, getUnassociatedSource, isRatioUsesSqrt, setMaxScoreThreshold, setRatioUsesSqrt, setScoreRatioThreshold, uniqueDestination, uniqueSource
-
Constructor Details
-
AssociateNearestNeighbor_ST
-
-
Method Details
-
setSource
Description copied from interface:AssociateDescription
Sets the list of source features. NOTE: A reference to the input list might be saved internally until the next call to this function.- Specified by:
setSource
in interfaceAssociateDescription<D>
- Overrides:
setSource
in classAssociateNearestNeighbor<D>
- Parameters:
listSrc
- List of features
-
setDestination
Description copied from interface:AssociateDescription
Sets the list of destination features NOTE: A reference to the input list might be saved internally until the next call to this function.- Specified by:
setDestination
in interfaceAssociateDescription<D>
- Overrides:
setDestination
in classAssociateNearestNeighbor<D>
- Parameters:
listDst
- List of features
-
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. -
getDescriptionType
Description copied from interface:Associate
Returns the type of object it can associate
-