feat(dip): matlab dip lab1
BIN
Matlab/dip/lab1/CH3.2.2.bmp
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
Matlab/dip/lab1/PIC1.2.3_24b.bmp
Normal file
After Width: | Height: | Size: 134 B |
BIN
Matlab/dip/lab1/PIC1.2.3_256.bmp
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Matlab/dip/lab1/PIC2.4.3a-RGB24b.bmp
Normal file
After Width: | Height: | Size: 240 KiB |
BIN
Matlab/dip/lab1/PIC2.4.3b-GRAY.bmp
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
Matlab/dip/lab1/cameraman.tif
Normal file
BIN
Matlab/dip/lab1/lab1_0.bmp
Normal file
After Width: | Height: | Size: 295 KiB |
BIN
Matlab/dip/lab1/lab1_1.bmp
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
Matlab/dip/lab1/lab1_2.bmp
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
Matlab/dip/lab1/lab1_3.bmp
Normal file
After Width: | Height: | Size: 12 KiB |
8
Matlab/dip/lab1/lab1_3.m
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
close all
|
||||||
|
clear
|
||||||
|
clc
|
||||||
|
disp('====E1_2_1.m====');
|
||||||
|
I1=imread('lab1_2.bmp');
|
||||||
|
subplot(2,2,1),imshow(I1),xlabel('(a)256 色位图'); % 语句1
|
||||||
|
I2=imread('lab1_0.bmp');
|
||||||
|
subplot(1,2,2),imshow(I2),xlabel('(b)24位位图');
|
11
Matlab/dip/lab1/lab1_4.m
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
clear;
|
||||||
|
clc
|
||||||
|
close all;
|
||||||
|
disp('====E2_4_2.m====');
|
||||||
|
I=imread('PIC2.4.3a-RGB24b.bmp');
|
||||||
|
imfinfo('PIC2.4.3a-RGB24b.bmp')
|
||||||
|
I2=im2bw(I); % 语句1
|
||||||
|
imwrite(I2,'PIC2.4.3b-GRAY.bmp');
|
||||||
|
imfinfo('PIC2.4.3b-GRAY.bmp')
|
||||||
|
figure,subplot(1,2,1),imshow(I);
|
||||||
|
subplot(1,2,2),imshow(I2);
|
10
Matlab/dip/lab1/lab1_5.m
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
close all
|
||||||
|
clear
|
||||||
|
clc
|
||||||
|
disp('====CH3_2_2.m====');
|
||||||
|
I1=imread('lab1_0.bmp');
|
||||||
|
I2=imresize(I1,0.1,'nearest'); % 语句1
|
||||||
|
I3=imresize(I1,10.5,'triangle'); % 语句2
|
||||||
|
figure,imshow(I1),xlabel('原图像');
|
||||||
|
figure,imshow(I2),xlabel('缩小后的图像');
|
||||||
|
figure,imshow(I3),xlabel('放大后的图像');
|
10
Matlab/dip/lab1/lab1_6.m
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
close all
|
||||||
|
clear
|
||||||
|
clc
|
||||||
|
disp('====CH3_2_3.m====');
|
||||||
|
I1=imread('lab1_0.bmp');
|
||||||
|
I2=imrotate(I1,-60,'bilinear'); % 语句1
|
||||||
|
I3=imrotate(I1,60,'bicubic','crop'); % 语句2
|
||||||
|
subplot(2,2,1),imshow(I1),xlabel('原图像');
|
||||||
|
subplot(2,2,3),imshow(I2),xlabel('顺时针旋转30度后的图像');
|
||||||
|
subplot(2,2,4),imshow(I3),xlabel('逆时针旋转30度后的图像');
|
10
Matlab/dip/lab1/lab1_7.m
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
close all
|
||||||
|
clear
|
||||||
|
clc
|
||||||
|
disp('====CH3_2_4.m====');
|
||||||
|
I = imread('lab1_0.bmp');
|
||||||
|
I1=fliplr(I); % 语句1
|
||||||
|
I2=flipud(I); % 语句2
|
||||||
|
subplot(2,1,1),imshow(I),xlabel('(a)原始图像');
|
||||||
|
subplot(2,2,3),imshow(I1),xlabel('(b)水平镜像图像');
|
||||||
|
subplot(2,2,4),imshow(I2),xlabel('(c)垂直镜像图像');
|