In this project, we warped images in order to stitch and blend them together to create mosaics. We also tested the accuracy of our warping by rectifing images, which is changing the perspective of an object in an image.
In order to warp from points of set p_a from Image A to points of set p_b in Image B, we solve for a homography (transformation) which will allow use to transform any points in A to the appropriate location in B. We model our homographies as projective transformations with eight degrees of freedom (eight unknowns). Selecting 4 or more correspondences (points common to the two images) allows us to use least-squares to solve for H (homography).
|
|
In order to show our calculation of the homography between two images is correct, we take an image of a planar surface and warp it so that the plane is frontal-parallel.
Now that we can accurately find our homography between two images and warp the image accordingly, we create our mosaic. In order to create our mosaics, we warp imA to a left side. We then warp imB to warped imA using a set of similar correspondences. We then overlap the warped images and blend them together. In this case we used multiresolution blending.
|
|
|
|
The final step was to select alignment points (using project 3 alignment and multiresoluton code) and multiresolution blend the images.
I learned that stitching together mosaics is actually remarkably simple and easy. The hardest part is picking a blending algorithm that works and taking pictures that behave well. I also learned how well inverse transform (compared to forward transform) and homographies work. I was sadly sick for project 4 and didnt get a chance to fully understand it until now.