传统图像去噪方法matlab仿真.docVIP

  • 3
  • 0
  • 约2.62千字
  • 约 6页
  • 2022-06-01 发布于湖北
  • 举报
传统图像去噪方法matlab仿真 %邻域滤波 I=imread(cameraman.tif); %读取图像 J=imnoise(I,gaussian,0,0.007);%加入均值为0,方差为0.007的高斯噪声 subplot(2,3,1);imshow(I); title(原始图像); subplot(2,3,2); imshow(J); title(加入高斯噪声之后的图像); %采用MATLAB中的函数filter2对受噪声干扰的图像进行均值滤波 K1=filter2(fspecial(average,3),J)/255; %模板尺寸为3 K2=filter2(fspecial(average,5),J)/255;% 模板尺寸为5 K3=filter2(fspecial(average,7),J)/255; %模板尺寸为7 K4= filter2(fspecial(average,9),J)/255; %模板尺寸为9 subplot(2,3,3);imshow(K1); title(3*3滤波效果); subplot(2,3,4); imshow(K2); title(5*5滤波效果); subplot(2,3,5);imshow(K3); title(7*7滤波效果); subplot(2,3,6);imshow(K4); title(9*9滤波效果);

文档评论(0)

1亿VIP精品文档

相关文档