Python Generated Panoramic Images

Python Generated Panoramic Images

This post will demonstrate how to use OpenStitching, a python process for stitching images into a panoramic scene.  Details about OpenStitching can be found here, https://github.com/OpenStitching/stitching.  The manual process involved when using Hugin or Image Composite Editor are more time consuming.  The OpenStitching process can be automated to generate numerous panoramic images without the need to be in front of a computer.

The OpenStitching example above was a series of images taken with the ESP32-Cam module on an earlier project.  The results with OpenStitching have a better balance that from Image Composite Editor, shown below.

There are some limitations that are inherent with all of the stitching options, each photo needs to have similarities for the process to match adjacent images.  Below is a panorama created by merging both FLIR images with visible images that were reduced with an edge filter and overlayed with 20 percent transparency.

 

The OpenStitching repo site provides details about the use of the python script.  The examples shown here used the following command.

cd path-containing-images-and-python-script
py stitch.py *.jpg

This process took less than a minute for the examples here.  Using too many images will slow down the process considerably and likely provide poor results.  20-30 percent overlap has been sufficient in the samples tested in this post.  One of the interesting facets found from the results were objects removed that weren’t visible in adjacent scenes.  Below is an example panorama where the people that were walking on the trail are not included.

If you have a need for a simple cross platform option to quickly and automatically generate panoramic images, OpenStitching is a good choice.  Below is a video demonstrating the process further and they offer examples on thier GitHub repo, https://github.com/biplob004/ImageStitchingPython.

 

Comments are closed.