Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Image Mosaicing

This project of mine is the implementation of some computer vision and linear algebra methods to stich images. These images were taken by a person who was standing at one point and rotating his camera from left to right to take several overlapping images.(FYI, these images show the beautiful view from the main-gate of the EC department of NIT Rourkela, my Alma Mater)

Input 1 Input 2 Stiched Output
Input 1 Input 2 Input 3 Stiched Output

Theory-cum-steps

  1. Find key points in both the images
  2. Keypoints between two images are matched by identifying their nearest neighbours. But in some cases, the second closest-match may be very near to the first. It may happen due to noise or some other reasons. In that case, ratio of closest-distance to second-closest distance is taken.
  3. Theoretically, we need 9 matchings to estimate the homography matrix but the libraries select a bunch of them, detect outliers if any using the RANSAC algorithm, and then solve equations to estimate the homography matrix.
  4. Then that homography matrix is used to generate a perspective for stitching the images together.

Required Packages

Use the package manager pip

  1. OpenCV
  2. Numpy
  3. matplotlib (for visualization)

Usage

python panorama.py path/to/img/ path/to/img/ 

This program can stich more than 2 images as well. Refer to the below given example.

python panorama.py images/ec1.jpeg images/ec2.jpeg images/ec3.jpeg

License

MIT

About

Program to generate a panorama photograph.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages