22 lines
544 B
Matlab
22 lines
544 B
Matlab
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Â˲¨');
|