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

Namespace: Emgu.CV.Features2D
Assembly: Emgu.CV (in Emgu.CV.dll) Version: 2.4.10.1935 (2.4.10.1935)

Syntax

C#
public void KnnMatch(
	Matrix<T> queryDescriptor,
	Matrix<int> trainIdx,
	Matrix<float> distance,
	int k,
	Matrix<byte> mask
)
Visual Basic
Public Sub KnnMatch ( 
	queryDescriptor As Matrix(Of T),
	trainIdx As Matrix(Of Integer),
	distance As Matrix(Of Single),
	k As Integer,
	mask As Matrix(Of Byte)
)
Visual C++
public:
void KnnMatch(
	Matrix<T>^ queryDescriptor, 
	Matrix<int>^ trainIdx, 
	Matrix<float>^ distance, 
	int k, 
	Matrix<unsigned char>^ mask
)
F#
member KnnMatch : 
        queryDescriptor : Matrix<'T> * 
        trainIdx : Matrix<int> * 
        distance : Matrix<float32> * 
        k : int * 
        mask : Matrix<byte> -> unit 

Parameters

queryDescriptor
Type: Emgu.CV..::..Matrix<(Of <(<'T>)>)>
An n x m matrix of descriptors to be query for nearest neighbours. n is the number of descriptor and m is the size of the descriptor
trainIdx
Type: Emgu.CV..::..Matrix<(Of <(<'Int32>)>)>
The resulting n x k matrix of descriptor index from the training descriptors
distance
Type: Emgu.CV..::..Matrix<(Of <(<'Single>)>)>
The resulting n x k matrix of distance value from the training descriptors
k
Type: System..::..Int32
Number of nearest neighbors to search for
mask
Type: Emgu.CV..::..Matrix<(Of <(<'Byte>)>)>
Can be null if not needed. An n x 1 matrix. If 0, the query descriptor in the corresponding row will be ignored.

See Also