极值滤波算法Matlab程序代码使用Matlab软件编程,程序如下I=imread(Lena.bmp); a=imnoise(I,salt & pepper,0.05);a=double(a);dep,wide=size(a);new_image=ones(size(a);for i=1:depfor j=1:wideif i=1&j=1m=max(a(1,1) a(1,2) a(2,1) a(2,2);n=min(a(1,1) a(1,2) a(2,1) a(2,2);if a(i,j)=m|a(i,j)=nnew_image(i,j)=median(a(1,1) a(1,2) a(2,1) a(2,2);elsenew_image(i,j)=a(i,j);endendif i=1&j=widem=max(a(1,wide-1) a(1,wide) a(2,wide-1) a(2,wide);n=min(a(1,wide-1) a(1,wide) a(2