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( CvMat samples, int k, CvMat results = null, float[][] neighbors = null, CvMat neighborResponses = null, CvMat dist = null )
Parameters
- samples
- Type: OpenCvSharpCvMat
Known samples (l*n) - k
- Type: SystemInt32
max neighbors to find - results (Optional)
- Type: OpenCvSharpCvMat
[Missing <param name="results"/> documentation for "M:OpenCvSharp.CPlusPlus.CvKNearest.FindNearest(OpenCvSharp.CvMat,System.Int32,OpenCvSharp.CvMat,System.Single[][],OpenCvSharp.CvMat,OpenCvSharp.CvMat)"]
- neighbors (Optional)
- Type: SystemSingle
[Missing <param name="neighbors"/> documentation for "M:OpenCvSharp.CPlusPlus.CvKNearest.FindNearest(OpenCvSharp.CvMat,System.Int32,OpenCvSharp.CvMat,System.Single[][],OpenCvSharp.CvMat,OpenCvSharp.CvMat)"]
- neighborResponses (Optional)
- Type: OpenCvSharpCvMat
Neighbors for each samples (l*k) - dist (Optional)
- Type: OpenCvSharpCvMat
Distance from each sample to neighbors
Return Value
Type: Single[Missing <returns> documentation for "M:OpenCvSharp.CPlusPlus.CvKNearest.FindNearest(OpenCvSharp.CvMat,System.Int32,OpenCvSharp.CvMat,System.Single[][],OpenCvSharp.CvMat,OpenCvSharp.CvMat)"]
See Also