The code does feature matching (SIFT) between two images and then applies normalized linear homography estimation, robustified by standard RANSAC.
Known and to be fixed bug: Denormalization of the H matrix should happen in the ransacHMatrix() function, after calculating the H_ matrix
Example #1:
Input1:
Input2:
Homography estimation to transform Input2 to fit Input1:
Example #2:
Input1:
Input2:
Homography estimation to transform Input2 to fit Input1: