Skip to main content
. 2022 Dec 6;22(23):9539. doi: 10.3390/s22239539
Algorithm 1: Salient Projection Region Location Procedure
Input: image P, area A, ratio of width and height R, area ratio ranging from A1 to A2,
 aspect ratio ranging from R1 to R2;
Output: selected region
 1: WP.width
 2: HP.height
 3: Atrand(A1,A2)×A
 4: Rtrand(R1,R2)
 5: HtAt×Rt
 6: WtAt÷Rt
 7: WeightSRA(P)
 8: SRA is Spatial Relation-Aware Attention [13]. The weight matrix W with WeightP rows
  and HeightP columns can be obtained from the SRA [13]. Obtain the weights.
 9: for i In Wt do
10:    for j In Ht do
11:      
12:      if i+WtWj+HtH then
13:         Sii+Wtjj+HtWeight
14:      end if
15:    end for
16: end for
17: Use the loop to find the maxS and its P(x,y)
18: return region (P,Wt,Ht)