Recover Affine Transform
Recently, I wrote code for the following:
Allow the user to mark n corresponding points on two images and recover the best affine transform using these control points.
It basically stores the coordinates of points clicked by the user for the first image.
It basically stores the coordinates of points clicked by the user for the second image.
After getting the coordinates, X = np.dot(np.inv(A),B) is performed to get the required six values, followed by applying the recovered matrix to the original image.
I have tested 3 transformations namely rotation, translation and scaling.
The sequence of output images is as follows:
1. original input image.
2. transformed input image.
3. output of applying recovered matrix using corresponding points on the original input image.
Code can be accessed using this repository.