3

I'm using OpenCV 3.2 and I have a Stitcher set up to stitch two images. The stitching works great. But once it is complete I want to be able to determine the mapping from a point in image A to the corresponding point in image B.

I don't care how the images are laid out in the panorama, I just need to be able to transform from (x_A,y_A), the coordinates of a point in image A, to (x_B, y_B), the coordinates of the corresponding point in image B.

How do I get that mapping out of OpenCV using the Stitcher class?

Note: It's also acceptable to tell me how to get the mapping from image A to the panorama and then from the panorama to image B.

Note: Also, if there's a cheaper way where I can just get the mapping and I don't have to invoke the whole Stitcher pipeline, I'd like to know that too.

Jeru Luke
  • 20,118
  • 13
  • 80
  • 87
Wyck
  • 10,311
  • 6
  • 39
  • 60
  • Afaik there is no way to get the resulting transformation from the Stitcher class. But it is open source, so you can modify it and add a getter to access that transformation. With a homography you can just move from image A to B by multiplying the pixel point position by the matrix and move from B to A by the inverse matrix multiplication. – Micka Jan 13 '17 at 06:19

0 Answers0