0

I am trying to stitching images using this blog Image Panorama Stitching with OpenCV

enter image description here

enter image description here

# Apply panorama correction
width = trainImg.shape[1] + queryImg.shape[1]
height = trainImg.shape[0] + queryImg.shape[0]

result = cv2.warpPerspective(trainImg, H, (width, height))
result[0:queryImg.shape[0], 0:queryImg.shape[1]] = queryImg

Here's Thalles Silva complete code for Image Panorama Stitching with OpenCV

I would like to know how much of the area of the images actual overlap like in this post OpenCV determine area of intersect/overlap

enter image description here

enter image description here

Where and how should I alter Thalles Silva complete code to get the area of intersection, confused?

  • You need masks that define the common regions in each image. – fmw42 Jun 24 '21 at 21:45
  • Modify each image so that there is no black. You can just add +1 to each channel. Warp each image to a common output such that the background is black and the rest is still non-black. Then make a mask for each image by changing (thresholding) all non-zero values to white. Use the bitwise_and() to find where the two image overlap. – fmw42 Jun 24 '21 at 21:54

0 Answers0