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.
- 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
- Python 3.x
- OpenCV 4.x
- PyQt5
-
Clone the repository:
git clone https://github.com/yourusername/image-stitching-app.git cd image-stitching-app
-
Install the required packages:
pip install opencv-python-headless pyqt5
-
Navigate to the project directory:
cd image-stitching-app
-
Run the application:
python app.py
-
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.
- Feature Detection: SIFT (Scale-Invariant Feature Transform) is used to detect and compute keypoints and descriptors for both images.
- Feature Matching: BFMatcher (Brute Force Matcher) with KNN (k-nearest neighbors) is used to find matches between descriptors.
- Homography Calculation: A homography matrix is computed using RANSAC to find the best alignment between the two sets of keypoints.
- 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.
app.py
: Main application script containing the GUI and image stitching logic.
This project utilizes the OpenCV library for computer vision tasks and PyQt5 for creating the graphical user interface.
This project is licensed under the MIT License.