I'm investigating ways of transforming an image and overlaying it within a contour of another image.
As best as I can tell there are three ways to do this with OpenCV in Python:
getAffineTransform()
getPerspectiveTransform()
findHomography()
I found three different methods via blog and SO posts and they all produce the same results, i.e. taking a source image and warping/overlaying on a contour of a different shape on a destination image.
This demonstrates getAffineTransform()
https://stackoverflow.com/a/38323528/1887261
This demonstrates getPerspectiveTransform()
http://uberhip.com/python/image-processing/opencv/2014/10/26/warping-brien/
This demonstrates findHomography()
http://www.learnopencv.com/homography-examples-using-opencv-python-c/#download
I'm wondering what is the best method to use and why would you use one over the other?