15-463: Computational Photography
Project 4: IMAGE WARPING and MOSAICING
Eugenio Dominguez
edomingu@andrew.cmu.edu
For this project the task was to automatically stitch photo mosaics. To accomplish this it was necessary to warp the images that form the mosaic and blend them together to minimize the seams.
The project is divided in two parts. For the first one we can manually select control points to compute the homography between the images. For the second part we have to automatically compute the homography without any input from the user, following the paper “Multi-Image Matching using Multi-Scale Oriented Patches” by Brown et al.
The algorithm for the first part of the project works in the folowing way:
To stitch two images together:
- Manually select control points in both images.
- Compute the transformation matrix between both images using the control points.
- Warp one image into the other.
- To blend the images I used a two level Laplacian pyramid that works in the following way:
- Compute the alpha channel of both images by warping with the same transformation matrix a white rectangule the size of the image.
- Apply the distance transform to the alpha channel of both images.
- Compute the center weighted alpha channel of both images using the formula: alpha_channel_image_one / (alpha_channel_image_one + alpha_channel_image_two).
- Blend the lower frequencies of both images using this alpha channel.
- Blend the higher frequencies of both images using a binary alpha channel.
The algorithm for the second part of the project works in the folowing way:
To stich this images together
- Detect Harris corners in both images.
- Using adaptive non-maximal suppression keep only 500 Harris corners with local maximum strength.
- Extract 8 by 8 features descriptors using a spacing of 5 pixels between samples.
- Normalize descriptors to a mean of 0 and a standard deviation of 1.
Descriptor of feature indicated by the red point
- Threshold descriptors using the ratio between the nearest and second nearest strength.
- Compute the homography between the images using RANSAC to reject outliers
- Continue as in part one to stitch the mosaic.
And after cropping
Examples
Mosaics with manually selected control points (Part 1)
Using the calculated homographies is also posible to rectify images
Mosaics with automatically calculated homography (Part 2)
Making a mosaic with night and day pictures of the same scene
Using homographies is also posible to apply textures to surfaces in pictures
It seems that people is using the Prokudin-Gorskii gallery as advertising in Pittsburgh