📄 96-05-11ex14.m
字号:
%96-05-11
%example 13
clear all;
f=checkerboard(50);
s=0.8;
theta=pi/6;
t=[s*cos(theta) s*sin(theta) 0
-s*sin(theta) s* cos(theta) 0
0 0 1];
tform= maketform('affine',t);
g=imtransform(f,tform);
g2=imtransform(f,tform,'nearest');
g3=imtransform(f,tform,'FillValue',0.5);
t2=[1 0 0;0 1 0;50 50 1];
tform2=maketform('affine',t2);
g4=imtransform(f,tform2);
g5=imtransform(f,tform2,'Xdata',[1 400],'Ydata',[1 400]...
,'Fillvalue',0.5);
figure;
subplot(3,2,1);
imshow(f,[])
subplot(3,2,2);
imshow(g,[])
subplot(3,2,3);
imshow(g2,[])
subplot(3,2,4);
imshow(g3,[])
subplot(3,2,5);
imshow(g4,[])
%example 14
f=imread ('d:\image\nicework.tif');
g=imtransform(f,tform,'FillValue',0.5);
figure
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -