去除图片高斯噪声和椒盐噪声(图像处理)

发布时间:2025-02-11 11:05

城市噪音艺术:利用声音设计,将噪音转化为艺术,如城市噪音地图、声音雕塑。 #生活乐趣# #生活艺术# #城市生活艺术# #城市景观艺术#

去除图片高斯噪声和椒盐噪声(图像处理)

最新推荐文章于 2024-08-10 16:38:09 发布

杦栯 于 2019-11-12 20:04:11 发布

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

最小值最大值中值均值滤波去除高斯噪声和椒盐噪声

#代码如下:

clear;clc;
f=imread(‘rice.png’);
f1=imnoise(f,‘gaussian’);
f2=imnoise(f,‘salt & pepper’,0.02);
[m,n]=size(f1);
g1=f1;
g2=f2;
mask=[1 1 1;1 1 1;1 1 1]/9;
for x=2:m-1
for y=2:n-1
subimage=double(f1(x-1:x+1,y-1:y+1));
temp=subimage.*mask;
g1(x,y)=round(sum(sum(temp)));
subimage2=double(f2(x-1:x+1,y-1:y+1));
temp2=subimage2.*mask;
g2(x,y)=round(sum(sum(temp2)));
end
end
g1=uint8(g1);
g2=uint8(g2);
subplot(221),imshow(f1);
subplot(222),imshow(f2);
subplot(223),imshow(g1);
subplot(224),imshow(g2);

clear;clc;
I=imread(‘rice.png’);
f1=imnoise(I,‘gaussian’);
f2=imnoise(I,‘salt & pepper’,0.02);
[m,n]=size(f1);
g1=f1;
g2=f2;
mask=[1 1 1 1 1;1 1 1 1 1;1 1 1 1 1;1 1 1 1 1;1 1 1 1 1]/25;
for x=3:m-2
for y=3:n-2
subimage=double(f1(x-2:x+2,y-2:y+2));
temp=subimage.*mask;
g1(x,y)=round(sum(sum(temp)));
subimage2=double(f2(x-2:x+2,y-2:y+2));
temp2=subimage2.*mask;
g2(x,y)=round(sum(sum(temp2)));
end
end
g1=uint8(g1);
g2=uint8(g2);
subplot(221),imshow(f1);
subplot(222),imshow(f2);
subplot(223),imshow(g1);
subplot(224),imshow(g2);

I = imread(‘pout.tif’);
f1=imnoise(I,‘gaussian’);
f2=imnoise(I,‘salt & pepper’,0.02);
[m,n] = size(I);
g1=f1;
g2=f2;
mask=[1 1 1 1 1;1 1 1 1 1;1 1 1 1 1;1 1 1 1 1;1 1 1 1 1 ]/25;
for x=3:m-2
for y=3:n-

网址:去除图片高斯噪声和椒盐噪声(图像处理) https://www.yuejiaxmz.com/news/view/767549

相关内容

图像处理(12)
图像去噪技术:消除模糊和杂音的关键
去噪声方法总结
去除高斯噪声滤波器
噪声滤波与信号增强:技术与应用
图像去噪技术概览
摄像机热噪声消除技术
音频噪声处理:消除干扰并提高声音质量1.背景介绍 音频噪声处理是一种重要的信号处理技术,它旨在从音频信号中去除干扰和噪声
噪声/振动噪声检测
噪声问题分类处理 消解家居噪声之痛

随便看看