The goal of this assignment is to explore different aspects of image warping with a cool application - image mosaicking. I will take two or more photographs and create an image mosaic by registering, projective warping, re-sampling, and compositing them. Along the way, I will demonstrate how to compute homographies, and how to use them to warp images.
To recover the homographies between 2 images, we need at least 4 correspondences. This is because homographies can be expressed by the following transformation with 8 unknowns.
Notice the above equation is not in b = Ax form. For the sake of easier computation, we rearrange the matrix as the following b = Ax form:
However, one complication is that the 4 points selected might be noisy. So we should select more than 4 points and minimise the matrix rather than solving it directly.
From the homography transformation theory about, to rectify an image, I take a single image of a planar surface. Then I apply the warping to transform 4 points into to a frontal-parallel plane.
As the following images, I rectified the original into a top-view.
Original | Rectified |
---|
Original | Rectified |
---|
Original | Rectified |
---|
Warp the images so they're registered and create an image mosaic. I left one image unwrapped and warp the other image into its projection. Then I blended the images together.
I first picked correspondences from both images.
Then I computed homographies and warped the first image into the other projection.
After that, I padded both images to prepare for blending.
Finally I blended the two images
Left | Right | Blended |
---|
Left | Right | Blended |
---|
For blending the two padded images, I tried different ways of blending them.
α blending | Multi-resolution Gradient Domain Blending | Poisson Blending |
---|