Skip to main content
. 2019 Sep 21;19(19):4089. doi: 10.3390/s19194089
Algorithm 1 Mapping DAOI into P
Input: The AOI: DAOI
Output: The pheromone matrix: P=(pi,j)m×n
  • 1:

    XMAX=max(x), XMIN=min(x), YMAX=max(y), YMIN=min(y), where (x,y)DAOI

  • 2:

    DMBR={(x,y)|x[XMIN,XMAX],y[YMIN,YMAX]}

  • 3:

    XMAX=XMAX+Δx, XMIN=XMINΔx, YMAX=YMAX+Δy, YMIN=YMINΔy, where Δx>(XMAXXMIN)/(2m2), Δy>(YMAXYMIN)/(2n2)

  • 4:

    D={(x,y)|x[XMIN,XMAX],y[YMIN,YMAX]}

  • 5:
    Scatter D into m×n rectangles. Label them with Di,j where i=1,2,,m, and j=1,2,,n. Calculate the center of each rectangle, with the center of Di,j being (xc(i),yc(j)):
    xc(i)=XMIN+2i12m×(XMAXXMIN)
    ,
    yc(j)=YMIN+2j12n×(YMAXYMIN)
    .
  • 6:
    Create matrix P=(pi,j)m×n
    pi,j=,(xc(i),yc(j))DAOI,0,(xc(i),yc(j))DAOI.