Research Article

Pixel Intensity Clustering Algorithm for Multilevel Image Segmentation

Algorithm 1

PICA of .
Input: grayscale image, number of clusters.
Output: grayscale image.
Let , represents the set of image pixel intensities and assuming BCV is the between cluster variance.
(1) for all    do
(2)  
(3)  estimate the th cluster centroid using the pixel intensity
(4)  assign cluster label to the pixel intensity
(5)  swap the pixel intensity with the pixel intensity
(6) end for
(7) for all    do
(8)  for all    do
(9)     tentatively allocate pixel intensity to the th cluster
(10)    BCV =    (variance of the th cluster centroid)
(11)    for all    and   not equal to   do
(12)         BCV = BCV +    (variance of the th cluster centroid)
(13)    end for
(14)  end for
(15)  permanently allocate to the cluster that gives maximum BCV
(16)  assign cluster label to the allocated pixel intensity
(17)  update cluster centroid
(18) end for
(19) compute output image
(20) stop