自己小编的均值滤波器程序源代码clcclear%彩色图像灰度化a=imread('C:\Users\wk\Desktop\2\IMG_20130423_143258.bmp');g=rgb2gray(a);figure(1)imshow(g)g=uint16(g);title('灰度图像');[m,n]=size(g);f=zeros(m,n);f(1,1)=(g(1,1)+g(1,2)+g(2,1)+g(2,2));f(m,1)=1/4*(g(m-1,1)+g(m-1,2)+g(m,1)+g(m,2));f(1,n)=1/4*(g(1,n-1)+g(1,n)+g(2,n-1)+g(2