CvKNearest Constructor (Mat, Mat, Mat, Boolean, Int32) OpenCvSharp Class Library
Training constructor

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

public CvKNearest(
	Mat trainData,
	Mat responses,
	Mat sampleIdx = null,
	bool isRegression = false,
	int maxK = 32
)

Parameters

trainData
Type: OpenCvSharp.CPlusPlusMat
Known samples (m*n)
responses
Type: OpenCvSharp.CPlusPlusMat
Classes for known samples (m*1)
sampleIdx (Optional)
Type: OpenCvSharp.CPlusPlusMat

[Missing <param name="sampleIdx"/> documentation for "M:OpenCvSharp.CPlusPlus.CvKNearest.#ctor(OpenCvSharp.CPlusPlus.Mat,OpenCvSharp.CPlusPlus.Mat,OpenCvSharp.CPlusPlus.Mat,System.Boolean,System.Int32)"]

isRegression (Optional)
Type: SystemBoolean

[Missing <param name="isRegression"/> documentation for "M:OpenCvSharp.CPlusPlus.CvKNearest.#ctor(OpenCvSharp.CPlusPlus.Mat,OpenCvSharp.CPlusPlus.Mat,OpenCvSharp.CPlusPlus.Mat,System.Boolean,System.Int32)"]

maxK (Optional)
Type: SystemInt32
Maximum number of neighbors to return
See Also

Reference