摘要:
cl;m=31;n=31;img=zeros(m+1,n+1);img=double(img);pi=3.1415926;sigma=10;for i=-(m/2):m/2 for j=-(n/2):n/2 img(i+m/2+1,j+n/2+1)=(1/(2*pi*sigma*sigma))*exp(-(i*i+j*j)/(2*sigma*sigma)); endendimg=mat2gray(img);imshow(img);imwrite(img,'pic.bmp');%一个更好的实现,2012.12.18修改h=5;w=2;[x y]=meshgrid(-w... 阅读全文