对图像文件增加椒盐噪声,然后进行中值滤波

Y=imread(‘D:\321.jpg’);%读入图像

I=rgb2gray(Y);%转换成灰度图

J =imnoise(I,‘salt & pepper’,0.02);%给图像添加椒盐噪声

K =medfilt2(J);%对增加噪声后的图像进行中值滤波

subplot(2,2,1);

imshow(I);

title(‘原图’);%显示图像,并命名‘原图’

subplot(2,2,2);

imshow(J);

title(‘加噪声后’);%显示图像,并命名‘加噪声后’

subplot(2,2,3);

imshow(K);

title(‘加噪中值滤波后’);%显示图像,并命名‘加噪中值滤波后’
使用matlab进行医学图像处理

相关文章:

  • 2021-11-23
  • 2021-12-10
  • 2022-02-07
  • 2021-12-15
  • 2021-05-20
  • 2021-09-26
  • 2021-06-03
猜你喜欢
  • 2021-04-04
  • 2021-11-10
  • 2022-01-21
  • 2021-04-04
  • 2021-10-28
  • 2021-12-13
相关资源
相似解决方案