function RectificationViaEuclidean

im = imread('rect.png');

theta = 20/180*pi;
R = [cos(theta) -sin(theta);
     sin(theta) cos(theta)];
t = [size(im,2)/2; size(im,1)/2];
H = [R -R*t+t;0 0 1];

im_warped = ImageWarpingEuclidean(im, H);

figure(2)
clf;
imshow(im_warped);
% imwrite(im_warped, 'euclidean.png');

