Emgu CV Library Documentation
cvKMeans2 Method (samples, cluster_count, labels, termcrit)
NamespacesEmgu.CVCvInvokecvKMeans2(IntPtr, Int32, IntPtr, MCvTermCriteria)

www.emgu.com/wiki
implements k-means algorithm that finds centers of cluster_count clusters and groups the input samples around the clusters. On output labels(i) contains a cluster index for sample stored in the i-th row of samples matrix
Declaration Syntax
C#Visual BasicVisual C++
public static void cvKMeans2(
	IntPtr samples,
	int cluster_count,
	IntPtr labels,
	MCvTermCriteria termcrit
)
Public Shared Sub cvKMeans2 ( _
	samples As IntPtr, _
	cluster_count As Integer, _
	labels As IntPtr, _
	termcrit As MCvTermCriteria _
)
public:
static void cvKMeans2(
	IntPtr samples, 
	int cluster_count, 
	IntPtr labels, 
	MCvTermCriteria termcrit
)
Parameters
samples (IntPtr)
Floating-point matrix of input samples, one row per sample
cluster_count (Int32)
Number of clusters to split the set by
labels (IntPtr)
Output integer vector storing cluster indices for every sample
termcrit (MCvTermCriteria)
Specifies maximum number of iterations and/or accuracy (distance the centers move by between the subsequent iterations)

Assembly: Emgu.CV (Module: Emgu.CV) Version: 1.5.0.0 (1.5.0.0)