Click or drag to resize

DescriptorMatcherKnnMatch Method (Mat, Mat, Int32, Mat, Boolean)

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
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 3.4.1.20180605-33-CaRLSharp
Syntax
public DMatch[][] KnnMatch(
	Mat queryDescriptors,
	Mat trainDescriptors,
	int k,
	Mat mask = null,
	bool compactResult = false
)

Parameters

queryDescriptors
Type: OpenCvSharpMat
trainDescriptors
Type: OpenCvSharpMat
k
Type: SystemInt32
mask (Optional)
Type: OpenCvSharpMat
compactResult (Optional)
Type: SystemBoolean

Return Value

Type: DMatch
See Also