Research Article

KmsGC: An Unsupervised Color Image Segmentation Algorithm Based on -Means Clustering and Graph Cut

Algorithm 1

The basic structure of the presented algorithm KmsGC.
1st  stage. Clustering
   Input: image
   Output: initial pixel partition.
  (1) initialize
  (2) for :
   (3)   -means       is the cluster to be partitioned into 2
   (4)  calculate intra, inter, CP
   (5)  calculate
   (6)   = find( )
   (7) endfor
   (8) = find( )
   (9) Return the pixel partition corresponding to .
2nd  stage. Image segmentation
  Input: initial pixel partition
  Output: segmented image
   (1) Initialization.
   (2) Determine the data term as (7)
   (3) Determine the smooth term as (8)
   (4) Construct a graph correspond to the energy function
   (5) Compute the minimum cost multi-way cut using the expansion algorithm.
   (6) Return segmented image