0

I am using OpenCV stitching sample code or you can see a simplified version of this here. My images are being stitched properly to form a panorama. I want to use the same Homography matrix or Affine matrix to transform a single data-point on one image into the panorama. The data-point is received separately than the image but the coordinates of that data-point are according to the original image dimensions.

I can see in the Matchers.hpp file in opencv2 folder

line 110 CV_PROP_RW Mat H; //!< Estimated transformation

that this Mat H is the Homography matrix but I cant seem to find where and how it is being used in the stitching sample which I posted in the start. If I get this info I can use it to transform that datapoint by using the same commands. If my approach is wrong please tell me what else to do.

Areeb Muzaffar
  • 197
  • 2
  • 15

1 Answers1

0

So I found the answer to this. First use the stitched output image and each input image separately to find out homography matrices by which all input images are being transformed. Then use perspective transform of source points of a particular image and the corresponding homography to find out destination points. This way the coordinate you select as a source point in one input picture will be transformed into a coordinate in the stitched output as the destination point. And it will be the same part of picture that was selected in the input.

Areeb Muzaffar
  • 197
  • 2
  • 15