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_5.m

25 lines
871 B
Mathematica
Raw Normal View History

2022-11-21 03:42:00 +00:00
close all
clear
clc
disp('====E4_8_1.m====');
I1=[0 0 0 240 80 100 240 0 0 0]
uint8I1=uint8(I1);
subplot(2,4,1),imshow(uint8I1),xlabel('(a-1)<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD>(l=4)');
subplot(2,4,2),plot(I1,'.-'),axis([0 11 0 250]),xlabel('(a-2)<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD><EFBFBD>ĻҶ<EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
J1=medfilt2(uint8I1,[1,3]) % <EFBFBD><EFBFBD><EFBFBD><EFBFBD>1
uint8J1=uint8(J1);
subplot(2,4,3),imshow(uint8J1),xlabel('(b-1)1-D<EFBFBD><EFBFBD>ֵ<EFBFBD>˲<EFBFBD>ͼ<EFBFBD><EFBFBD>(r=3)');
subplot(2,4,4),plot(J1,'.-'),axis([0 11 0 250]),xlabel('(b-2)1-D<EFBFBD><EFBFBD>ֵ<EFBFBD>˲<EFBFBD>ͼ<EFBFBD><EFBFBD><EFBFBD>Ҷ<EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
J2=medfilt2(uint8I1,[1,9])
uint8J2=uint8(J2);
subplot(2,4,5),imshow(uint8J2),xlabel('(c-1)1-D<EFBFBD><EFBFBD>ֵ<EFBFBD>˲<EFBFBD>ͼ<EFBFBD><EFBFBD>(r=4)');
subplot(2,4,6),plot(J2,'.-'),axis([0 11 0 250]),xlabel('(c-2)1-D<EFBFBD><EFBFBD>ֵ<EFBFBD>˲<EFBFBD>ͼ<EFBFBD><EFBFBD><EFBFBD>Ҷ<EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
J3=medfilt2(uint8I1,[1,11])
uint8J3=uint8(J3);
subplot(2,4,7),imshow(uint8J3),xlabel('(d-1)1-D<EFBFBD><EFBFBD>ֵ<EFBFBD>˲<EFBFBD>ͼ<EFBFBD><EFBFBD>(r=5)');
subplot(2,4,8),plot(J3,'.-'),axis([0 11 0 250]),xlabel('(d-2)1-D<EFBFBD><EFBFBD>ֵ<EFBFBD>˲<EFBFBD>ͼ<EFBFBD><EFBFBD><EFBFBD>Ҷ<EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>');