This Python script demonstrates how to create a mosaic by stitching two images together using the Scale-Invariant Feature Transform (SIFT) algorithm for keypoint detection and matching, along with the Random Sample Consensus (RANSAC) algorithm for estimating the homography matrix.
- Python 3
- OpenCV (
cv2
) - NumPy
- Matplotlib
You can install the required packages via pip:
pip install opencv-python numpy matplotlib
-
Clone the repository or download the script.
-
Ensure you have two input images (
img1.jpg
andimg2.jpg
) in the same directory as the script. -
Run the script:
python mosaicking.py