⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cfarzz.m

📁 CFAR代码
💻 M
字号:
function out= CFARzz(result,N)
[m,n]=size(result);         %m=75,n=66
d=zeros(size(result));      %d=75*66,  every value is 0    
out=d;                      %out=75*66
for x=1:m
    for y=N+1:n-N
        aft=result(x,y-N:y-2);       %aft---line:x, colom:(1 to N-1);(2 to N).......(n-2N to n-N-2)
        bef=result(x,y+2:y+N);       %bef---line:x, colom:(N+3 to 2N+1);(N+4 to 2N+2)........(n-N+2 to n)
        if(result(x,y)>3*mean(aft'))&&(result(x,y)>3*mean(bef')), 
            out(x,y)=result(x,y);    %process colom from 17 to 50
        end
    end
    for y=3:N                       %if less than 16, use 1 to the num-2(one for safe)
        aft=result(x,1:y-2);
        bef=result(x,y+2:2*y-1);
        if(result(x,y)>4*mean(aft'))&&(result(x,y)>4*mean(bef')),
            out(x,y)=result(x,y);   %process colom from 3 to 16
        end
    end
    for y=n-N+1:n-2                %more than 51, use num+2 to 66(one for safe)
        aft=result(x,2*y-n:y-2);
        bef=result(x,y+2:n);
        if (result(x,y)>4*mean(aft'))&&(result(x,y)>4*mean(bef')),
            out(x,y)=result(x,y);  %process colom from 51 to 64
        end
    end
end;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -