Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to stitch images with differing orientations

I have a set of images collected from a drone that I now want to stitch together. The approach I started going towards is to rotate all the images to the proper orientation, then try to stitch those together. However since the rotated images are no longer rectangular, I have large empty areas with no image data. As expected, these dark areas have caused poor stitching results.

I have seen the api for stitch:

Status  stitch (InputArrayOfArrays images, const std::vector< std::vector< Rect > > &rois, OutputArray pano)

I like that there is an "ROI" parameter, however the data type is a "Rect" instead of something like a "RotatedRect" or a mask. So this looks like it won't work either.

The only other approach I can think of is to further crop the image to remove the no-data areas of the image (which would require more images to make up for the lost data).

I am not an expert in OpenCV so I'm looking for some awesome ideas from all you experts. Is there a better way to approach this?

How to stitch images with differing orientations

I have a set of images collected from a drone that I now want to stitch together. The approach I started going towards is to rotate all the images to the proper orientation, then try to stitch those together. However since the rotated images are no longer rectangular, I have large empty areas with no image data. As expected, these dark areas have caused poor stitching results.

I have seen the api for stitch:

Status  stitch (InputArrayOfArrays images, const std::vector< std::vector< Rect > > &rois, OutputArray pano)

I like that there is an "ROI" parameter, however the data type is a "Rect" instead of something like a "RotatedRect" or a mask. So this looks like it won't work either.

The only other approach I can think of is to further crop the image to remove the no-data areas of the image (which would require more images to make up for the lost data).

I am not an expert in OpenCV so I'm looking for some awesome ideas from all you experts. Is there a better way to approach this?

Update for clarification These images are rotated arbitrarily depending on the direction the camera was facing. The orientation may vary on all angles. The worst case scenario is where I'd need to rotate the image to 45 degrees in order to register it with the others.