Image Stitching (Panoramic) from Scratch
Homography estimation and panoramic reconstruction combining SVD, backward warping, and image blending (no built-in libraries like OpenCV)
✨ Motivation
This project demonstrates how homography estimation can be used to warp and blend images into panoramic mosaics. Unlike relying on built-in libraries (e.g., OpenCV’s stitcher()
), the entire pipeline was implemented from scratch in Python, providing a clear, step-by-step understanding of projective geometry and image blending.
🛠️ Pipeline Overview
The process consists of four main modules:
1. Point Selection
Corresponding points were selected manually by clicking on the images. The selection quality is critical because errors often result from:
- The number of points chosen
- Their distribution across the images
- The precise ordering of point pairs
Examples of selected points on Paris A and Paris B:

Paris A – Selected points corresponding to Paris B

Paris B – Selected points corresponding to Paris A
For more details about point selection, see this page.
2. Homography Estimation
A homography matrix was computed to map each source image onto the reference plane defined by Paris B.
3. Image Warping
Each image was warped to align with the base image using backward warping. This involves mapping each destination pixel back to its source location.
Example warped image:

Warped Paris A
4. Blending Images
Finally, the warped images were combined with the base image to produce a continuous panorama. Simple pixel replacement was used in overlapping regions.
Example of a blended result:

Blended Image
✅ Summary of Steps
- Select corresponding points carefully.
- Estimate the homography matrix.
- Warp the images to the same plane.
- Blend them into a seamless mosaic.
📝 Reflections
- Point Selection: The most critical factor in quality.
- SVD Stability: Robust when outliers were minimized.
- Blending: Simple merging created visible seams; more advanced blending could improve results.
- Learning Outcome: Building the pipeline manually provided an in-depth understanding of homography-based image stitching.
🔗 Links
Feel free to explore the repository and try stitching your own images!