23 lines
544 B
Mathematica
23 lines
544 B
Mathematica
|
close all
|
|||
|
clear
|
|||
|
clc
|
|||
|
disp('====E4_7_5.m====');
|
|||
|
|
|||
|
I=imread('eight.tif');
|
|||
|
subplot(2,3,1),imshow(I),xlabel('(a)ԭʼͼ<EFBFBD><EFBFBD>');
|
|||
|
|
|||
|
J=imnoise(I,'salt & pepper',0.4); % <EFBFBD><EFBFBD><EFBFBD><EFBFBD>1
|
|||
|
subplot(2,3,2),imshow(J),xlabel('(b)<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD>');
|
|||
|
|
|||
|
K1=wiener2(J,[3,3]);
|
|||
|
subplot(2,3,3),imshow(uint8(K1)),xlabel('(c)3*3Wiener<EFBFBD>˲<EFBFBD>');
|
|||
|
|
|||
|
K2=wiener2(J,[5,5]);
|
|||
|
subplot(2,3,4),imshow(uint8(K2)),xlabel('(d)5*5Wiener<EFBFBD>˲<EFBFBD>');
|
|||
|
|
|||
|
K3=wiener2(J,[7,7]);
|
|||
|
subplot(2,3,5),imshow(uint8(K3)),xlabel('(e)7*7Wiener<EFBFBD>˲<EFBFBD>');
|
|||
|
|
|||
|
K4=wiener2(J,[9,9]);
|
|||
|
subplot(2,3,6),imshow(uint8(K4)),xlabel('(f)9*9Wiener<EFBFBD>˲<EFBFBD>');
|