I have the following two images. I am wanting to warp im1 into the plane of im2, ie. im2 is the target plane.
So, I compute the homography between sparse matching points
cv::Mat H = cv::findHomography(matPt1, matPt2, CV_RANSAC );
cv::Mat xxim = im1.clone();
cv::warpPerspective(im1, xxim, H, cv::Size(im2.rows, im2.cols) );
imshow( "xxim", xxim );
I had expected to see something like :
However, I see :
I would also like to mention that this code worked fine when I had OpenCV2.2. However recently I upgraded my opencv to 2.4.9 and now it is causing trouble.