Research Article

Lung Cancer Detection Using Image Segmentation by means of Various Evolutionary Algorithms

Algorithm 4

k-Means clustering.
(1)Select the cluster centers. Let them be “C.”
(2)Calculate the Euclidean distance.
(3)Take each and every pixel and assign them into the appropriate cluster if the Euclidean distance is minimum between the cluster and pixel.
(4)Once the segregation is completed for all the pixels, recalculate the new cluster center using the following formula:
(5)Repeat the steps from 2 to 4 for some number of iterations or until a certain condition is encountered.