资源简介
可用于sar图像去噪,matlab语言~直接可以使用
代码片段和文件信息
%Lee filter for speckle noise reduction
%Authors : Jeny Rajan Chandrashekar P.S
%Usage - lee(I)
%I is the noisy image (gray level image m x n x 1)
function [le]=lee(I)
[x y z]=size(I)
I=double(I);
N=zeros(xyz);
for i=1:x
i
for j=1:y
% Checking first and last pixel of first row%
if (i==1 & j==1)
mat(1)=0;
mat(2)=0;
mat(3)=0;
mat(4)=0;
mat(5)=I(ij);
mat(6)=I(ij+1);
mat(7)=0;
mat(8)=I(i+1j);
mat(9)=I(i+1j+1);
end
if (i==1 & j==y)
mat(1)=0;
mat(2)=0;
mat(3)=0;
mat(4)=I(ij-1);
mat(5)=I(ij);
mat(6)=0;
mat(7)=I(i+1j-1);
mat(8)=I(i+1j);
mat(9)=0;
end
% Checking first and last pixel of last row%
if (i==x & j==1)
mat(1)=0;
mat(2)=I(i-1j);
mat(3)=I(i-1j+1);
mat(4)=0;
mat(5)=I(ij);
评论
共有 条评论