close all
clear
clc
disp('====E4_7_5.m====');

I=imread('eight.tif');
subplot(2,3,1),imshow(I),xlabel('(a)原始图像');

J=imnoise(I,'salt & pepper',0.4);    % 语句1
subplot(2,3,2),imshow(J),xlabel('(b)噪声图像');

K1=wiener2(J,[3,3]);
subplot(2,3,3),imshow(uint8(K1)),xlabel('(c)3*3Wiener滤波');

K2=wiener2(J,[5,5]);
subplot(2,3,4),imshow(uint8(K2)),xlabel('(d)5*5Wiener滤波');

K3=wiener2(J,[7,7]);
subplot(2,3,5),imshow(uint8(K3)),xlabel('(e)7*7Wiener滤波');

K4=wiener2(J,[9,9]);
subplot(2,3,6),imshow(uint8(K4)),xlabel('(f)9*9Wiener滤波');
