Skip to main content
. 2023 Jan 17;2023:1566123. doi: 10.1155/2023/1566123

Table 2.

Algorithm for image segmentation using the HARIS technique.

Algorithm: HARIS algorithm for image segmentation
Start
 Set the value of “max”
  //Determine the centroid of the segment through, Sn=∑i=1max(intimaxμmax)(intimaxμmax)T
  //Pixel assignment based on the Mahalanobis distance d2(int, pixn) stated as follows: d2(int, pixn)=(int − μi)intDx−1(int − μi)
  //Assess the intraclass correlation determined by α, α=σi2σi2+σe2/2
  //Assess the interclass variance determined by β, by assuming β=0 initially
   for the value i = 0 to max-1, β=∑Cr=1maxωr(x)σr2(x)
   end of for
  //Implementing the first objective function-I
   set the value of parameters like totpix, pixr, totcent, pixs, f(x)=(α × totpix/pixr)+(β × totcent/pixs)
   return the value of f(x)
  //Identify the fitness_spi, GBspfitness from the previous iteration
   Assume max represents the sum of segments in the image
    for the value i = 0 to max-1, spi=rand(0,1) × fitness_spi−1+rand(0,1) × (GBspfitnessfitnessspi−1), seg = evaluate (α, β)
     return the value of spi and seg
    end of for
End