Skip to content

Combining two images with calculation of the squared difference values and creating a path for stitching.

Notifications You must be signed in to change notification settings

omerfaruktekin13/Stitching-Two-Images-in-Python-OpenCV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Stitching Two Images in Python OpenCV

Project Media

Dxxxxx
Final Result
Dxxxxx
Left Part of the Image (Gondor from LOTR)
Dxxxxx
Right Part of the Image (Rohan from LOTR)
Dxxxxx
Calculated Stitch Path
Dxxxxx
Stitched Image Before Filters

Description

I want to share an algorithm: "Stitching Images with Calculation of Squared Difference of the Pixels." Briefly, the methodology calculates the smallest squared difference of the overlapped pixels in grayscale and creates a path in the way you choose. I used Minas Tirith (Gondor Castle) and Rohan images to test my algorithm which is written in Python and OpenCV. The second and third images represent the original images from the Lord of the Rings movies. The fourth one depicts the calculated seam path by the algorithm in grayscale and the last image is the result in an RGB color map. I added median blur to decrease the sharp-cutting places of the images to the final result and show it in grayscale (first image). In the end, we have a perfect image that Gandalf riding his Shadowfax between two mankind towns in Middle Earth.

Tools and Languages

python

* Python3

* OpenCV

* Jupyter Notebook or any suitable integrated development environment (IDE)

Installation

  1. Download Stitching.py file
  2. Use your own images and change the image path in the code
  3. Try other overlapping sizes to observe changes in your combined image.

Open to Development

Please share your comments and ideas about the project with me. Thank you for your time.

About

Combining two images with calculation of the squared difference values and creating a path for stitching.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages