Skip to content

Instantly share code, notes, and snippets.

@ecmelkytz
Created January 8, 2014 20:17
Show Gist options
  • Select an option

  • Save ecmelkytz/8323825 to your computer and use it in GitHub Desktop.

Select an option

Save ecmelkytz/8323825 to your computer and use it in GitHub Desktop.
clc;
a=imread('cameraman.tif');
t=[2 0 0; 0 3 0; 0 0 1];
tform=maketform('affine',t);
k=imtransform(a,tform);
figure(1);
imshow(a);
figure(2);
imshow(k);
kose=diag(t);
z=[1 0 0; 0 1 0; 0 0 1];
for i=1:length(z)
z(1,i)=z(1,i)/kose(1);
z(2,i)=z(2,i)/kose(2);
end
yeni=maketform('affine',z)
yeni=imtransform(k,yeni);
figure(3);
imshow(yeni)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment