Finds the K nearest neighbors of samples
Namespace: OpenCvSharp.CPlusPlus
Assembly: OpenCvSharp.CPlusPlus (in OpenCvSharp.CPlusPlus.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public virtual float FindNearest( Mat samples, int k, Mat results, Mat neighborResponses, Mat dists )
Parameters
- samples
- Type: OpenCvSharp.CPlusPlusMat
Known samples (l*n) - k
- Type: SystemInt32
max neighbors to find - results
- Type: OpenCvSharp.CPlusPlusMat
[Missing <param name="results"/> documentation for "M:OpenCvSharp.CPlusPlus.CvKNearest.FindNearest(OpenCvSharp.CPlusPlus.Mat,System.Int32,OpenCvSharp.CPlusPlus.Mat,OpenCvSharp.CPlusPlus.Mat,OpenCvSharp.CPlusPlus.Mat)"]
- neighborResponses
- Type: OpenCvSharp.CPlusPlusMat
Neighbors for each samples (l*k) - dists
- Type: OpenCvSharp.CPlusPlusMat
Distance from each sample to neighbors
Return Value
Type: Single[Missing <returns> documentation for "M:OpenCvSharp.CPlusPlus.CvKNearest.FindNearest(OpenCvSharp.CPlusPlus.Mat,System.Int32,OpenCvSharp.CPlusPlus.Mat,OpenCvSharp.CPlusPlus.Mat,OpenCvSharp.CPlusPlus.Mat)"]
See Also