{"id":4624,"date":"2024-05-28T12:00:08","date_gmt":"2024-05-28T19:00:08","guid":{"rendered":"https:\/\/www.cloudacm.com\/?p=4624"},"modified":"2024-04-27T20:47:07","modified_gmt":"2024-04-28T03:47:07","slug":"python-generated-panoramic-images","status":"publish","type":"post","link":"https:\/\/www.cloudacm.com\/?p=4624","title":{"rendered":"Python Generated Panoramic Images"},"content":{"rendered":"<p>This post will demonstrate how to use OpenStitching, a python process for stitching images into a panoramic scene.\u00a0 Details about OpenStitching can be found here, <a href=\"https:\/\/github.com\/OpenStitching\/stitching\">https:\/\/github.com\/OpenStitching\/stitching<\/a>.\u00a0 The manual process involved when using Hugin or Image Composite Editor are more time consuming.\u00a0 The OpenStitching process can be automated to generate numerous panoramic images without the need to be in front of a computer.<\/p>\n<p><a href=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/result-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4626\" src=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/result-1.jpg\" alt=\"\" width=\"2110\" height=\"286\" srcset=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/result-1.jpg 2110w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/result-1-300x41.jpg 300w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/result-1-1024x139.jpg 1024w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/result-1-768x104.jpg 768w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/result-1-1536x208.jpg 1536w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/result-1-2048x278.jpg 2048w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/result-1-604x82.jpg 604w\" sizes=\"auto, (max-width: 2110px) 100vw, 2110px\" \/><\/a><\/p>\n<p>The OpenStitching example above was a series of images taken with the ESP32-Cam module on an earlier project.\u00a0 The results with OpenStitching have a better balance that from Image Composite Editor, shown below.<\/p>\n<p><a href=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/imagecompositeditor.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4627\" src=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/imagecompositeditor.jpg\" alt=\"\" width=\"2263\" height=\"309\" srcset=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/imagecompositeditor.jpg 2263w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/imagecompositeditor-300x41.jpg 300w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/imagecompositeditor-1024x140.jpg 1024w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/imagecompositeditor-768x105.jpg 768w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/imagecompositeditor-1536x210.jpg 1536w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/imagecompositeditor-2048x280.jpg 2048w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/imagecompositeditor-604x82.jpg 604w\" sizes=\"auto, (max-width: 2263px) 100vw, 2263px\" \/><\/a><\/p>\n<p>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.\u00a0 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.<\/p>\n<p><a href=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/result.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4625\" src=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/result.jpg\" alt=\"\" width=\"2117\" height=\"261\" srcset=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/result.jpg 2117w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/result-300x37.jpg 300w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/result-1024x126.jpg 1024w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/result-768x95.jpg 768w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/result-1536x189.jpg 1536w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/result-2048x252.jpg 2048w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/result-604x74.jpg 604w\" sizes=\"auto, (max-width: 2117px) 100vw, 2117px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>The OpenStitching repo site provides details about the use of the python script.\u00a0 The examples shown here used the following command.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cd path-containing-images-and-python-script\r\npy stitch.py *.jpg<\/pre>\n<p>This process took less than a minute for the examples here.\u00a0 Using too many images will slow down the process considerably and likely provide poor results.\u00a0 20-30 percent overlap has been sufficient in the samples tested in this post.\u00a0 One of the interesting facets found from the results were objects removed that weren&#8217;t visible in adjacent scenes.\u00a0 Below is an example panorama where the people that were walking on the trail are not included.<\/p>\n<p><a href=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/NoWalkers-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4629\" src=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/NoWalkers-scaled.jpg\" alt=\"\" width=\"2560\" height=\"357\" srcset=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/NoWalkers-scaled.jpg 2560w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/NoWalkers-300x42.jpg 300w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/NoWalkers-1024x143.jpg 1024w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/NoWalkers-768x107.jpg 768w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/NoWalkers-1536x214.jpg 1536w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/NoWalkers-2048x286.jpg 2048w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2024\/04\/NoWalkers-604x84.jpg 604w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><\/a><\/p>\n<p>If you have a need for a simple cross platform option to quickly and automatically generate panoramic images, OpenStitching is a good choice.\u00a0 Below is a video demonstrating the process further and they offer examples on thier GitHub repo, <a href=\"https:\/\/github.com\/biplob004\/ImageStitchingPython\">https:\/\/github.com\/biplob004\/ImageStitchingPython<\/a>.<\/p>\n<p><iframe loading=\"lazy\" title=\"Best open source Image stitching python code\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/TIZdwT8ymBo?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post will demonstrate how to use OpenStitching, a python process for stitching images into a panoramic scene.\u00a0 Details about OpenStitching can be found here, https:\/\/github.com\/OpenStitching\/stitching.\u00a0 The manual process involved when using Hugin or Image Composite Editor are more time consuming.\u00a0 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.\u00a0&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/www.cloudacm.com\/?p=4624\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4624","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts\/4624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4624"}],"version-history":[{"count":6,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts\/4624\/revisions"}],"predecessor-version":[{"id":4631,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts\/4624\/revisions\/4631"}],"wp:attachment":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}