?? 13-9.m
字號:
I = imread('eight.tif');
J = imnoise(I,'salt & pepper',0.02);
%圖像添加鹽椒噪聲
domain=[0 0 1 0 0;
0 1 0 1 0;
1 0 1 0 1;
0 1 0 1 0;
0 0 1 0 0];
K = ordfilt2(J,1,domain);
%3×3鄰域窗的最小值濾波
subplot(121),imshow(J)
title('添加鹽椒噪聲圖像')
subplot(122),imshow(K)
title('3×3鄰域窗的最小值濾波圖像')
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -