This project used homography to rectify and stitch images manually.
Given two images, A and B with their corresponding points pts_A and pts_B. Each image has at least 4 given points as with 8 sets of points total, the matrix can be resolved. Using p' = Hp, where H is the transformation matrix that transforms p to p'. A crucial part of the project is to compute the matrix H.
The goal for this section was to refocus the image at different focal depths within the image.
|
|
|
|
|
|
Given 2 images, stitch the images together. This involved calculating the offset and conducting linear blending.
Input Image 1 |
Input Image 2 |
Note the overlap lines on both sides of the ferris wheel |
Blended using Weighted Averages |
Input Image 1 |
Input Image 2 |
Panoramic direct overlap |
Panoramic with averaged blend (slightly different point set) |
The input images were already blurry so after warping, the effect of the blur was much stronger. The feathering blend did not fair much better here and a ghosting effect still occurs.
Input Image 1 |
Input Image 2 |
Panoramic stairs with averaged blend |
In this project, I learned how to use homographies to alter image perspectives. The image rectification portion was the most interesting. I've used apps like camscanner in the past which seem to be able to magically transform images from one angle to the next. Having learned the mathematical principles behind it, I've come to appreciate the app even more.