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;