In part of the project, I took several photos and implemented programs to recover homograhies, warp the images, rectify the images, and blend the images into a mosaic.
In this part, I shoot 3 pairs of photographs between which the transforms are projective. Each pairs have some overlapping fields of the view. I also shoot some photos for the rectification part. These photos are taken using my smart phone camera.
This part of the program produces a 3x3 matrix H with 9 degrees of freedom (lower right corner is a scaling factor that equals 1) that recovers the homography between each pair of images - p' = Hp. It first uses ginput to collect a set of (p', p) pairs of corresponding points taken from the two images. Then I set up A and b to compute the entries of matrix H.
In the next step for the project, I used the homography computed in the previous part to warp my images. I tooks 3 images with planar surfaces and tried warp them so that the plane is frontal-parallel.
Original | |||
Rectified |
This part warps the images to create an image mosaic. I do not have a properly working solution yet and am still trying to code it up.
Source1 | Source2 | Mosaic |
My takeaways from these projects include following: Starting from easier examples, such as squares/planar surface helps me to identify my bugs early; It is important to set up and transform matrices and equations and through this project I am getting more comfortable coding them.