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

18 lines
387 B
Mathematica
Raw Normal View History

2022-11-21 03:42:00 +00:00
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);