knnMatch (cv.DescriptorMatcher) - MATLAB File Help |
Finds the k best matches for each descriptor from a query set
matches = matcher.knnMatch(queryDescriptors, trainDescriptors, k)
matches = matcher.knnMatch(queryDescriptors, k)
[...] = matcher.knnMatch(..., 'OptionName', optionValue, ...)
k
possible matches
in total.matches{i}
is k
or less matches
for the same query descriptor. A cell array of length
size(queryDescriptors,1)
, each cell is a 1-by-(k or less)
structure array that has the following fields:
[size(queryDescriptors,1),size(trainDescriptors,1)]
.masks{i}
specifies
permissible matches between the input query descriptors and
stored train descriptors from the i-th image
trainDescCollection{i}
. Cell array of length
length(trainDescriptors)
, each a matrix of size
[size(queryDescriptors,1),size(trainDescriptors{i},1)]
.CompactResult
is false, the matches
vector
has the same size as queryDescriptors
rows. If
CompactResult
is true, the matches vector does not contain
matches for fully masked-out query descriptors. default falseThis extended variant of cv.DescriptorMatcher.match method finds several best matches for each query descriptor. The matches are returned in the distance increasing order. See cv.DescriptorMatcher.match for the details about query and train descriptors.
Access | public |
Sealed | false |
Static | false |