DescriptorMatcherKnnMatch Method (Mat, Mat, Int32, Mat, Boolean) OpenCvSharp Class Library
Find k best matches for each query descriptor (in increasing order of distances). compactResult is used when mask is not empty. If compactResult is false matches vector will have the same size as queryDescriptors rows. If compactResult is true matches vector will not contain matches for fully masked out query descriptors.

Namespace:  OpenCvSharp.CPlusPlus
Assembly:  OpenCvSharp.CPlusPlus (in OpenCvSharp.CPlusPlus.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public DMatch[][] KnnMatch(
	Mat queryDescriptors,
	Mat trainDescriptors,
	int k,
	Mat mask = null,
	bool compactResult = false
)

Parameters

queryDescriptors
Type: OpenCvSharp.CPlusPlusMat

[Missing <param name="queryDescriptors"/> documentation for "M:OpenCvSharp.CPlusPlus.DescriptorMatcher.KnnMatch(OpenCvSharp.CPlusPlus.Mat,OpenCvSharp.CPlusPlus.Mat,System.Int32,OpenCvSharp.CPlusPlus.Mat,System.Boolean)"]

trainDescriptors
Type: OpenCvSharp.CPlusPlusMat

[Missing <param name="trainDescriptors"/> documentation for "M:OpenCvSharp.CPlusPlus.DescriptorMatcher.KnnMatch(OpenCvSharp.CPlusPlus.Mat,OpenCvSharp.CPlusPlus.Mat,System.Int32,OpenCvSharp.CPlusPlus.Mat,System.Boolean)"]

k
Type: SystemInt32

[Missing <param name="k"/> documentation for "M:OpenCvSharp.CPlusPlus.DescriptorMatcher.KnnMatch(OpenCvSharp.CPlusPlus.Mat,OpenCvSharp.CPlusPlus.Mat,System.Int32,OpenCvSharp.CPlusPlus.Mat,System.Boolean)"]

mask (Optional)
Type: OpenCvSharp.CPlusPlusMat

[Missing <param name="mask"/> documentation for "M:OpenCvSharp.CPlusPlus.DescriptorMatcher.KnnMatch(OpenCvSharp.CPlusPlus.Mat,OpenCvSharp.CPlusPlus.Mat,System.Int32,OpenCvSharp.CPlusPlus.Mat,System.Boolean)"]

compactResult (Optional)
Type: SystemBoolean

[Missing <param name="compactResult"/> documentation for "M:OpenCvSharp.CPlusPlus.DescriptorMatcher.KnnMatch(OpenCvSharp.CPlusPlus.Mat,OpenCvSharp.CPlusPlus.Mat,System.Int32,OpenCvSharp.CPlusPlus.Mat,System.Boolean)"]

Return Value

Type: DMatch

[Missing <returns> documentation for "M:OpenCvSharp.CPlusPlus.DescriptorMatcher.KnnMatch(OpenCvSharp.CPlusPlus.Mat,OpenCvSharp.CPlusPlus.Mat,System.Int32,OpenCvSharp.CPlusPlus.Mat,System.Boolean)"]

See Also

Reference