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/Matlab/dip/lab3/lab3_1.m
2022-11-23 10:58:49 +08:00

17 lines
387 B
Matlab

close all
clear
clc
disp('====E4_7_1.m====');
I=[0 20 40 70
80 100 120 150
160 180 200 230]
uint8I=uint8(I)
subplot(2,2,1),imshow(uint8I),ylabel('原始图像');
subplot(2,2,2),imhist(uint8I);
mask = fspecial('average',5) % 语句1
J=filter2(mask,uint8I)
uint8J=uint8(J)
subplot(2,2,3),imshow(uint8J),ylabel('3*3均值滤波后的图像');
subplot(2,2,4),imhist(uint8J);