I successfully found the homography matrix between 2 images using:
Mat H = findHomography(mpts_2, mpts_1, RANSAC, 1, outlier_mask);
Now, with the given Mat H I wan’t to find the transformation for the four corner points of an image.
So how can I get the transformation for these points using warpPerspective()?!? Or do I have to use the transform() function?
I need the transformation of this points to get the intersection of the warped image with the original image.
Thanks in advance for you efforts…
I think you are interested in
perspectiveTransform(...). It is analogous towarpPerspective(...)only it operates on vectors, not on an entire image.