Image stitching
There has been a lot of work in image stitching over the years, but we will take a look at the algorithm OpenCV implements internally. Most of it was proposed by Michael Brown and David Lowe. Image stitching is done in the following steps:
- Find suitable features and match them reliably across the set of images to obtain the relative positioning.
- Develop the geometry to choose reliable features that are invariant to rotation, scale, and illumination.
- Match images using the RANSAC algorithm and a probabilistic model for verification.
- Align the matched images.
- Render the results to obtain a panoramic image. We use automatic straightening, gain compensation, and multi-band blending to achieve a seamlessly stitched panoramic image, as shown here:
Feature detection and matching
First, we find and match SIFT features between all the images. By doing this, we get the scale and orientation associated with each feature point. With these details, we can form a similarity invariant matrix...