Research Article

Ant Colony Optimization Approaches to Clustering of Lung Nodules from CT Images

Algorithm 7

Variant ant colony optimization for edge detection.
Input: Lung CT image.
Output: Edge detected image using Variant ACO algorithm.
begin
 feed the otsu algorithm output as the input for Ant Colony Optimization algorithm
 apply Ant Colony Optimization algorithm to the image
 the output image is the output of logical Ant Colony Optimization algorithm
end
(a) Otsu algorithm
Input: Lung CT image.
Output: Intermediate result—Edge detected and segmented image
begin
 for each pixel of image
  find weight of pixel for both foreground and background
  find mean of weights for both foreground and background
  find variance of the pixels
 end for
 calculate within-class variance for all the pixels
 maximum value of within-class variance gives the edge pixels.
end
(b) Ant Colony Optimization algorithm
Input: Lung CT image.
Output: Edge detected lung CT image.
begin
 for each pixel of image
  find weight of pixel for both foreground and background
  find mean of weights for both foreground and background
  find variance of the pixels
 end for
 calculate within-class variance for all the pixels
 maximum value of within-class variance gives the edge pixels.
 Initialize the base attractiveness, , and visibility, , for each edge
 for < IterationMax do:
  for each ant do:
   choose probabilistically (based on previous equation) the next state to move into;
   add that move to the tabu list for each ant
   repeat until each ant completed a solution
  end for
  for each ant that completed a solution do:
   update attractiveness for each edge that the ant traversed
  end for
  if (local best solution better than global solution)
   save local best solution as global solution
  end if
 end for
end