Skip to main content
. 2026 Feb 15;26(4):1277. doi: 10.3390/s26041277
Algorithm 1: Structure-Consistent CFAR (SC-CFAR)
Input: RD Map XRM×N; background window B size Nw; local
            neighborhood Ω (e.g., 5 × 5); intensity tolerance δ; base false
            alarm rate Pfa; parameters α>0,γ[0,1].
Output: Binary detection map D{0,1}M×N (1 = target, 0 = background).
  •  1:

    Initialize D0M×N;

  •  2:

    for each pixel (x,y) in X (excluding margin required by B and Ω) do

  •  3:

           Bxy set of background cells for sliding window around (x,y);

  •  4:

           μn1Nw(i,j)BxyX(i,j);

  •  5:

           σn1Nw(i,j)Bxy(X(i,j)μn)2;

  •  6:

           Ωxy set of coordinates in local neighborhood centered at (x,y)

  •  7:

           c0;

  •  8:

           for each (i,j)Ωxy do 

  •  9:

                 if |X(i,j)X(x,y)|<δ then 

  •  10:

                 cc+1

  •  11:

              end

  •  12:

       end

  •  13:

       C(x,y)c/|Ωxy|;

  •  14:

       T(x,y)μn+ασnln(1/Pfa)Nw(1γC(x,y));

  •  15:

       if X(x,y)>T(x,y) then 

  •  16:

            D(x,y)1;

  •  17:

       else

  •  18:

            D(x,y)0

  •  19:

       end

  •  20:

    return D;