I have calculated homography ,taken out perspective transform .I am able two display two images in one window but unable to merge them.Here are my example images->
You can easily blend two images using the addWeighted() function.
But the requirement is that you have to make the images of the same size.
If the images are not of same size first resize the two images. Then call the following function.
addWeighted(src1, alpha, src2, beta, 0.0, dst);
Declare the two Mat files
src1 = imread("c://test//blend1.jpg");
src2 = imread("c://test//blend2.jpg");
Also declare alpha and beta then save the result to Mat dst.
You can also get the details here Blending of Images using Opencv