📄 klinjinpingjun.asv
字号:
b=imread('D:\数字图像作业——把该文件夹放在D盘\girl.bmp'); % 读入图片girl.bmp。
I1=rgb2gray(b); % 将彩色图像转为灰度图像。
I=imnoise(I1,'salt & pepper',0.02);
subplot(231),imshow(I1);title('原图像');
subplot(232),imshow(I);title('添加椒盐噪声图像');
h=1/15.*[1 2 1;2 4 2;1 2 1];
K=imfilter(I,h);% K邻近平均法的模板
subplot(233),imshow(K);imshow(K);
figure
J= imnoise(I1,'gaussian',0,0.02);
subplot(234),imshow(I1);title('原图像');
subplot(235),imshow(J);title('添加高斯噪声图像');
K=imfilter(J,h);% K邻近平均法的模板
subplot(236),imshow(K);title('K邻近平均法滤除高斯
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -