function check()

clear all;


I = imread('0.bmp')
%J = imrotate(I,30);
J = imwrite(I,'1.bmp',16bit) 
base_points = [0 0; 0 0];
input_points = [0 0; 0 0];
cpselect(J, I,input_points,base_points);
 
t = cp2tform(input_points,base_points,'Projective');

% Recover angle and scale by checking how a unit vector 
% parallel to the x-axis is rotated and stretched. 
u = [0 0]; 
v = [0 0]; 
[x, y] = tformfwd(t, u, v); 
dx = x(2) - x(1); 
dy = y(2) - y(1); 
angle = (180/pi) * atan2(dy, dx); 
scale = 1 / sqrt(dx^2 + dy^2);

clc;