Ryan Thompson (rgt)
15-463 project 4
Image Warping and Mosaicing


Description


This project involved calculating a homography between images. Homographies can be used to rectify an image, or to create photo mosaics, among other things.

A homography was calculated by selecting correspondance points between two images.
Four points were needed to infer a homography, but more than four could be selected, resulting in an overconstrained system of equations
with which a least squares estimate (using mldivide) could be used to infer the homography.
Once a homography was calculated, an inverse mapping from destination image to source image could be created, and using interp2, the transformed image could be interpolated from the original.


Image rectification


One use of homographies is the rectification of images. Below are some examples of images that have been rectified to give the illusion of a 'head on' view of a rectangular object.


Rectification 1





Rectification 2







Photo Mosaicing


Another use of homographies is to create photo mosaics. Below are some examples of images that have been transformed to a common image plane, and stitched together to form panorams:


Photo Mosaic 1







Photo Mosaic 2







Photo Mosaic 3







Automatic Photo Mosaicing


Automatic Photo Mosaicing was performed in a five step process, implementing several facets of the paper Multi-Image Matching using Multi-Scale Oriented Patches” by Brown et al.,
in which correspondence points are found to compute a homography as follows.

Step 1: Corner Detection

Harris interest point detection was used to find corner points:

Step 2: Adaptive Non-Maximal Suppression

Collection of potential point matches were restricted to only those being a local maxima within a certain radius.
This radius was determined by lowering the minimum radius until a pre-determined amount of points were included (i.e. 500)

Step 3: Feature Descriptor Extraction and Feature Matching

8x8 feature samples were taken over 40x40 squares around feature points, and these features
were then compared to establish matches, based on ratio of of similarity to closest and second closest neighbors.

Step 4: Homography Computation using RANSAC

Finally, a homography was computed using the RANSAC algorithm (points used for homography shown below):



Autostitched Examples