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
Namespace: Emgu.CVAssembly: Emgu.CV (in Emgu.CV.dll) Version: 2.2.1.1150 (2.2.1.1150)
Syntax
C# | Visual Basic | Visual C++ |
Parameters
- samples
- IntPtr
Floating-point matrix of input samples, one row per sample
- clusterCount
- 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)
- attempts
- Int32
The number of attemps. Use 2 if not sure
- rng
- IntPtr
Pointer to CvRNG, use IntPtr.Zero if not sure
- flags
- Int32
Flags, use 0 if not sure
- centers
- IntPtr
Pointer to array of centers, use IntPtr.Zero if not sure
- compactness
- IntPtr
Pointer to array of doubles, use IntPtr.Zero if not sure
Return Value
[Missing <returns> documentation for "M:Emgu.CV.CvInvoke.cvKMeans2(System.IntPtr,System.Int32,System.IntPtr,Emgu.CV.Structure.MCvTermCriteria,System.Int32,System.IntPtr,System.Int32,System.IntPtr,System.IntPtr)"]