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 α, |
| //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) × (GBspfitness − fitnessspi−1), seg = evaluate (α, β) |
| return the value of spi and seg |
| end of for |
| End |