www.pudn.com > code.zip > lee.m, change:2014-06-01,size:430b


function LE = lee(I) 
A=I; %תɻҶͼƬ 
A=double(A); 
[I,J]=size(A); 
N=5; 
ENL=0.5227^2*mean2(A(1:250,1:250))^2/std2(A(1:250,1:250))^2 
 
%Lee˲ 
h=fspecial('average',N); 
Mean_A =filter2(h,A); 
Vax_a = nlfilter(A,[N N],'std2'); 
Vax_A =Vax_a.^2; 
k=(Vax_A-(Mean_A.^2./ENL))./(Vax_A.*(1+(1/ENL))); 
K=k; 
L=K<0; 
K(L)=0; 
LE=Mean_A+(A-Mean_A).*K; 
ENL_Lee=0.5227^2*mean2(LE(100:250,100:250))^2/std2(LE(100:250,100:250))^2