您的位置:首页 > 其它

分别使用二维统计滤波对椒盐噪声和高斯噪声进行滤波

2012-04-25 09:43 435 查看
function FuShiPengZhang
I=imread('C:\Users\user\Desktop\data\Gabor-1-120\2-1.jpg');
J1=imnoise(I,'salt & pepper',0.004); 
subplot(2,3,1);imshow(I); 
title('原始图像'); 
subplot(2,3,2);imshow(J1);
title('加椒盐噪声后的图像'); 
J= ordfilt2(J1,5,ones(3,4));% 进行二维统计顺序过滤 
subplot(2,3,3);imshow(J); title('椒盐噪声滤波后的图像'); 
J2=imnoise(I,'gaussian',0,0.004); 
subplot(2,3,4);imshow(J2); 
title('加高斯噪声后的图像'); 
J3= ordfilt2(J2,5,ones(3,4)); 
subplot(2,3,5);imshow(J3); title('高斯噪声滤波后的图像'); 
end
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐