Click or drag to resize

Cv2.Kmeans Method

clusters the input data using k-Means algorithm

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 3.4.1.20180605-33-CaRLSharp
Syntax
public static double Kmeans(
	InputArray data,
	int k,
	InputOutputArray bestLabels,
	TermCriteria criteria,
	int attempts,
	KMeansFlags flags,
	OutputArray centers = null
)

Parameters

data
Type: OpenCvSharp.InputArray
k
Type: System.Int32
bestLabels
Type: OpenCvSharp.InputOutputArray
criteria
Type: OpenCvSharp.TermCriteria
attempts
Type: System.Int32
flags
Type: OpenCvSharp.KMeansFlags
centers (Optional)
Type: OpenCvSharp.OutputArray

Return Value

Type: Double
See Also