This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
justhomework/DIPCV/lab3/lab4_4.m

23 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Â˲¨');