close all;
clear all;
clc;
[I,map] = imread('peppers.png');
Ta = maketform('affine',...
[cosd(30) -sind(30) 0;sind(30) cosd(30) 0;0 0 1]');
Ia = imtransform(I,Ta);
Tb = maketform('affine',[5 0 0;0 10.5 0;0 0 1]');
Ib = imtransform(I,Tb);
xform = [1 0 55;0 1 115;0 0 1];
Tc = maketform('affine',xform);
Ic = imtransform(I,Tc,'XData',...
[1 (size(I,2)+xform(3,1))],'YData',...
[1 size(I,1)+xform(3,2)],'FillValues',255);
Td = maketform('affine',[1 4 0;2 1 0;0 0 1]');
Id = imtransform(I,Td,'FillValues',255);
set(0,'defaultFigurePosition',[100,100,1000,500]);%修改图形图像位置默认位置
set(0,'defaultFigureColor',[1 1 1]); %修图形背景颜色的设置
figure;
subplot(121);imshow(Ia);axis on;
subplot(122);imshow(Ib);axis on;
figure;
subplot(121);imshow(Ic);axis on;
subplot(122);imshow(Id);axis on;