Book Image

Mastering OpenCV Android Application Programming

Book Image

Mastering OpenCV Android Application Programming

Overview of this book

Table of Contents (16 chapters)
Mastering OpenCV Android Application Programming
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
6
Working with Image Alignment and Stitching
Index

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:

  1. Find suitable features and match them reliably across the set of images to obtain the relative positioning.

  2. Develop the geometry to choose reliable features that are invariant to rotation, scale, and illumination.

  3. Match images using the RANSAC algorithm and a probabilistic model for verification.

  4. Align the matched images.

  5. 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,...