Affine transformation estimation by means of Least Square method