IndexKnnSearch Method (Mat, Int32, Single, Int32, SearchParams) OpenCvSharp Class Library
Performs a K-nearest neighbor search for multiple query points.

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

public void KnnSearch(
	Mat queries,
	out int[] indices,
	out float[] dists,
	int knn,
	SearchParams params
)

Parameters

queries
Type: OpenCvSharp.CPlusPlusMat
The query points, one per row
indices
Type: SystemInt32
Indices of the nearest neighbors found
dists
Type: SystemSingle
Distances to the nearest neighbors found
knn
Type: SystemInt32
Number of nearest neighbors to search for
params
Type: OpenCvSharp.CPlusPlus.FlannSearchParams
Search parameters
See Also

Reference