Reputation: 35
By looking at my images, I can not exactly tell if the transformation is only translation, rotation, stretch, shear or little bits of them all.
From what I understand, if I could mark some points between the two images, the getAffineTransformation function in python can get me the transformation matrix.
However, I do not want to mark points (as it is not easy to do so in images like these).
Is there a generic function that could take my two images and give me the transformation matrix? If not, how do I go about making one?
Upvotes: 1
Views: 5332
Reputation: 98
I know it's a bit late but I have been trying to solve the same problem as you and I think I found a solution.
The findTransformECC
method from the opencv2 library might be what you are looking for. It finds the motion between two images, no need to specify points. It supports different kinds of transformations -- affine
is one of them. There is a good article about image alignment with examples that use this method: Image Alignment (ECC) in OpenCV ( C++ / Python )
Upvotes: 1