, , [u v] [x y].
x=u+a*v y=v | (1) |
.
,
[ x y 1 ]=[ u v 1 ]*[ 1 0 0a 1 00 0 1] | (2) |
x y 1.
, , maketform.
a=0.45;T=maketform('affine', [1 0 0; a 1 0; 0 0 1]); , , . A=imread('football.jpg');h1=figure; imshow(A); title(' '); , , , .
orange=[255 127 0]';
T A. :
B=imtransform(A, T, 'cubic', 'FillValues', orange);
. , , . imtransform.
R=makeresampler({'cubic', 'nearest'}, 'fill');
B=imtransform(A, T, R, 'FillValues', orange);
h2=figure; imshow(B);