-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathm330.m
43 lines (37 loc) · 1.07 KB
/
m330.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
% f = imread('02.bmp');
% % imtool(f)
% I = imresize(f,3);
% figure,imshow(I)
%
% I3 = imrotate(f,35,'bilinear','crop');
% figure,imshow(I3)
%%
% I = imread('622.tif');
% I = rgb2gray(I);
% sx=2;sy=2;
% T = maketform('affine',[sx 0 0;0 sy 0;0 0 1]);
% I2 = imtransform(I,T);
% imshow(I2),title('Using affine transform')
% I3 = imresize(I,2);
% figure,imshow(I3),title('Using image resizing');
%%
% I = imread('622.tif');
% I = rgb2gray(I);
% theta = 35*pi/180;
% xform=[cos(theta) sin(theta) 0;-sin(theta) cos(theta) 0;0 0 1];
% T = maketform('affine',xform);
% I4 = imtransform(I,T);
% imshow(I4),title('Using affine trabsformtion');
% I5 = imrotate(I,35);
% figure,imshow(I5),title('Using image rotation');
%%
% I = imread('622.tif');
% I = rgb2gray(I);
% delta_x = 50;
% delta_y = 100;
% xform = [1 0 delta_x;0 1 delta_y;0 0 1];
% tform_translate = maketform('affine',xform);% ÓеãÎÊÌâ
% I6 = imtransform(I,tform_translate,'Xdata',[1 (size(I,2)+xform(3,1))],...
% 'Ydata',[1 (size(I,1)+xform(3,2))],'FillValues',128);
% figure,imshow(I6);
%%