Table of Contents

Method KnnSearch

Namespace
OpenCvSharp.Flann
Assembly
OpenCvSharp.dll

KnnSearch(float[], out int[], out float[], int, SearchParams)

Performs a K-nearest neighbor search for multiple query points.

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

Parameters

queries float[]

The query points, one per row

indices int[]

Indices of the nearest neighbors found

dists float[]

Distances to the nearest neighbors found

knn int

Number of nearest neighbors to search for

params SearchParams

Search parameters

KnnSearch(Mat, Mat, Mat, int, SearchParams)

Performs a K-nearest neighbor search for multiple query points.

public void KnnSearch(Mat queries, Mat indices, Mat dists, int knn, SearchParams @params)

Parameters

queries Mat

The query points, one per row

indices Mat

Indices of the nearest neighbors found

dists Mat

Distances to the nearest neighbors found

knn int

Number of nearest neighbors to search for

params SearchParams

Search parameters

KnnSearch(Mat, out int[], out float[], int, SearchParams)

Performs a K-nearest neighbor search for multiple query points.

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

Parameters

queries Mat

The query points, one per row

indices int[]

Indices of the nearest neighbors found

dists float[]

Distances to the nearest neighbors found

knn int

Number of nearest neighbors to search for

params SearchParams

Search parameters