Panorama Stitching
The purpose of this project is to stitch two or more images in order to create one seamless panorama image. I will be giving a very brief overview that is able to sufficiently understand the intuition behind how image stitching works.
There are 7 main parts behind how panorama stitching works:
-
-
Adaptive Non-Maximal Suppression (or ANMS):
ANMS is used to select a subset of all the key points which have high corner scores and which are averagely spatially distributed in the image. ANMS is easy to implement. Loop through all the initial key points, and for each keypoints compare the corner strength to all other key points.
-
Feature Descriptor:
Now that all the corners are found by implementing ANMS, which are also known as feature points, the next step is to describe each of the feature points by a feature vector. This is basically like encoding the information at each feature point by a vector.
-
Feature Matching:
Now, you want to match the feature points among the two images you want to stitch together. In computer vision terms, this step is called finding feature correspondences within the 2 images. Pick a point in image 1, and compute the sum of the square difference between all points in image 2. Take the ratio of the best match (lowest distance) to the second best match (second lowest distance) and if this is below some ratio keep the matched pair or reject it. Repeat this for all points in image 1. You will be left with only the confident feature correspondences and these points will be used to estimate the transformation between the 2 images also called Homography.
-
RANSAC:
We now have matched all the features correspondences but not all matches will be right. To remove incorrect matches, we will use a robust method called Random Sampling Consensus or RANSAC to compute homography. RANSAC, is an iterative method for estimating a mathematical model from a data set that contains outliers.
-
Cylindrical Projection: When we are try to stitch a lot of images with translation, a simple projective transformation (homography) will produce substandard results and the images will be strectched/shrunken to a large extent over the edges.
-
Blending Images: Panorama can be produced by overlaying the pairwise aligned images to create the final output image.
-
This project is able to stitch any number of given images – maybe 2 or 3 or 4 or 100 and create a panoromic image.
View Project