Skip to content

Photo_Stitching_with_OpenCv is a professional-grade Python project utilizing OpenCV to stitch two images into a seamless panoramic photo. It demonstrates advanced feature detection and matching techniques, providing the original images, the matching features, and the final panoramic result.

Notifications You must be signed in to change notification settings

cavadibrahimli1/Photo_Stitching_with_OpenCv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

image

Image Stitching Application

This is a simple image stitching application built using OpenCV and PyQt5. The application allows users to select two images, perform stitching to create a panorama, and visualize the result along with keypoint matches.

Features

  • Image selection through a graphical interface
  • SIFT feature detection and matching
  • Homography estimation for image alignment
  • Smooth blending of images to create a seamless panorama
  • Visualization of the stitched image and keypoint matches

Requirements

  • Python 3.x
  • OpenCV 4.x
  • PyQt5

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/image-stitching-app.git
    cd image-stitching-app
  2. Install the required packages:

    pip install opencv-python-headless pyqt5

Usage

  1. Navigate to the project directory:

    cd image-stitching-app
  2. Run the application:

    python app.py
  3. Use the graphical interface to select the paths of the two images you want to stitch. Click the "Stitch Images" button to start the stitching process.

How It Works

  1. Feature Detection: SIFT (Scale-Invariant Feature Transform) is used to detect and compute keypoints and descriptors for both images.
  2. Feature Matching: BFMatcher (Brute Force Matcher) with KNN (k-nearest neighbors) is used to find matches between descriptors.
  3. Homography Calculation: A homography matrix is computed using RANSAC to find the best alignment between the two sets of keypoints.
  4. Image Warping and Blending: The second image is warped according to the homography matrix and blended with the first image using a smoothing window to create a seamless panorama.

File Structure

  • app.py: Main application script containing the GUI and image stitching logic.

Example

image

image

image

Acknowledgements

This project utilizes the OpenCV library for computer vision tasks and PyQt5 for creating the graphical user interface.

License

This project is licensed under the MIT License.

About

Photo_Stitching_with_OpenCv is a professional-grade Python project utilizing OpenCV to stitch two images into a seamless panoramic photo. It demonstrates advanced feature detection and matching techniques, providing the original images, the matching features, and the final panoramic result.

Topics

Resources

Stars

Watchers

Forks

Languages