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 HI 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 to warpPerspective(...)
only it operates on vectors, not on an entire image.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.