Click or drag to resize

DescriptorMatcherKnnMatch Method (IInputArray, IInputArray, VectorOfVectorOfDMatch, Int32, IInputArray, Boolean)

http://www.emgu.com
Find the k-nearest match

Namespace:  Emgu.CV.Cuda
Assembly:  Emgu.CV.World (in Emgu.CV.World.dll) Version: 4.1.0.3408 (4.1.0.3408)
Syntax
public void KnnMatch(
	IInputArray queryDescriptors,
	IInputArray trainDescriptors,
	VectorOfVectorOfDMatch matches,
	int k,
	IInputArray mask = null,
	bool compactResult = false
)

Parameters

queryDescriptors
Type: Emgu.CVIInputArray
An n x m matrix of descriptors to be query for nearest neighbors. n is the number of descriptor and m is the size of the descriptor
trainDescriptors
Type: Emgu.CVIInputArray
Train set of descriptors. This set is not added to the train descriptors collection stored in the class object.
matches
Type: Emgu.CV.UtilVectorOfVectorOfDMatch
Matches. Each matches[i] is k or less matches for the same query descriptor.
k
Type: SystemInt32
Number of nearest neighbors to search for
mask (Optional)
Type: Emgu.CVIInputArray
Can be null if not needed. An n x 1 matrix. If 0, the query descriptor in the corresponding row will be ignored.
compactResult (Optional)
Type: SystemBoolean
Parameter used when the mask (or masks) is not empty. If 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.
See Also