96-05-11ex14.m
来自「Matlab數位影音處理 影像方面的處理」· M 代码 · 共 36 行
M
36 行
%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 + =
减小字号Ctrl + -
显示快捷键?