Cv2Kmeans Method OpenCvSharp Class Library
clusters the input data using k-Means algorithm

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

public static double Kmeans(
	InputArray data,
	int k,
	InputOutputArray bestLabels,
	TermCriteria criteria,
	int attempts,
	KMeansFlag flags,
	OutputArray centers = null
)

Parameters

data
Type: OpenCvSharp.CPlusPlusInputArray

[Missing <param name="data"/> documentation for "M:OpenCvSharp.CPlusPlus.Cv2.Kmeans(OpenCvSharp.CPlusPlus.InputArray,System.Int32,OpenCvSharp.CPlusPlus.InputOutputArray,OpenCvSharp.CPlusPlus.TermCriteria,System.Int32,OpenCvSharp.KMeansFlag,OpenCvSharp.CPlusPlus.OutputArray)"]

k
Type: SystemInt32

[Missing <param name="k"/> documentation for "M:OpenCvSharp.CPlusPlus.Cv2.Kmeans(OpenCvSharp.CPlusPlus.InputArray,System.Int32,OpenCvSharp.CPlusPlus.InputOutputArray,OpenCvSharp.CPlusPlus.TermCriteria,System.Int32,OpenCvSharp.KMeansFlag,OpenCvSharp.CPlusPlus.OutputArray)"]

bestLabels
Type: OpenCvSharp.CPlusPlusInputOutputArray

[Missing <param name="bestLabels"/> documentation for "M:OpenCvSharp.CPlusPlus.Cv2.Kmeans(OpenCvSharp.CPlusPlus.InputArray,System.Int32,OpenCvSharp.CPlusPlus.InputOutputArray,OpenCvSharp.CPlusPlus.TermCriteria,System.Int32,OpenCvSharp.KMeansFlag,OpenCvSharp.CPlusPlus.OutputArray)"]

criteria
Type: OpenCvSharp.CPlusPlusTermCriteria

[Missing <param name="criteria"/> documentation for "M:OpenCvSharp.CPlusPlus.Cv2.Kmeans(OpenCvSharp.CPlusPlus.InputArray,System.Int32,OpenCvSharp.CPlusPlus.InputOutputArray,OpenCvSharp.CPlusPlus.TermCriteria,System.Int32,OpenCvSharp.KMeansFlag,OpenCvSharp.CPlusPlus.OutputArray)"]

attempts
Type: SystemInt32

[Missing <param name="attempts"/> documentation for "M:OpenCvSharp.CPlusPlus.Cv2.Kmeans(OpenCvSharp.CPlusPlus.InputArray,System.Int32,OpenCvSharp.CPlusPlus.InputOutputArray,OpenCvSharp.CPlusPlus.TermCriteria,System.Int32,OpenCvSharp.KMeansFlag,OpenCvSharp.CPlusPlus.OutputArray)"]

flags
Type: OpenCvSharpKMeansFlag

[Missing <param name="flags"/> documentation for "M:OpenCvSharp.CPlusPlus.Cv2.Kmeans(OpenCvSharp.CPlusPlus.InputArray,System.Int32,OpenCvSharp.CPlusPlus.InputOutputArray,OpenCvSharp.CPlusPlus.TermCriteria,System.Int32,OpenCvSharp.KMeansFlag,OpenCvSharp.CPlusPlus.OutputArray)"]

centers (Optional)
Type: OpenCvSharp.CPlusPlusOutputArray

[Missing <param name="centers"/> documentation for "M:OpenCvSharp.CPlusPlus.Cv2.Kmeans(OpenCvSharp.CPlusPlus.InputArray,System.Int32,OpenCvSharp.CPlusPlus.InputOutputArray,OpenCvSharp.CPlusPlus.TermCriteria,System.Int32,OpenCvSharp.KMeansFlag,OpenCvSharp.CPlusPlus.OutputArray)"]

Return Value

Type: Double

[Missing <returns> documentation for "M:OpenCvSharp.CPlusPlus.Cv2.Kmeans(OpenCvSharp.CPlusPlus.InputArray,System.Int32,OpenCvSharp.CPlusPlus.InputOutputArray,OpenCvSharp.CPlusPlus.TermCriteria,System.Int32,OpenCvSharp.KMeansFlag,OpenCvSharp.CPlusPlus.OutputArray)"]

See Also

Reference