This project focused on finding and using homographies to rectify images. As per the instruction in lecture, I did not submit my code this part, and did not do the mosaic portion of Project 5 (since the professor explained we only had to rectify images)
I used my phone camera to shoot various images to stitch together into a mosaic and to rectify. Since I can't go outside, I shot two pictures of a random poster that I will eventually stitch into a mosaic. I also took a picture of my computer (showing the spec webpage) so I could rectify it using the screen and keys as anchors. For simpler processign, ic onverted the images ot black and white
This part doesn't have any visuals. I found my homography using a similar tactic to the one I used to find the affine warp in Project 3. I essentially set up a vector x = [a, b, c, d, e, f, g, h].T and created a corresponding A matri (source points) and b (target points). I then used Numpy's uilt in least squares solver to find x, then reshaped it into the homography matrix H. TO actually warp images, I simply found the inverse warp from the warped/rectified image to the source image. I then found and clipped the corresponding point in the source image for every point in the warped/recitifed image (in a vectorized fashion) and returned the warped image
I used the described procedure to rectify images of my computer from two perspectives (using the screen as a plane and the space bar as a plane).
I underestimated this part of the project because I assumed it was going to be a lot like Project 3. I learned that an 8 DoF homography is more complicated to calculate than a 6 DoF affine warp. I also learned that it's important to double check the ordering of corresponding keypoints and arguments to make sure things match up correctly. I also learned that rectification is not as simple as choosing a square/rectangle and rectifying to it. Choosing the corresponding keypoints (although they are a square or rectangle) is still difficult because you need to choose the right numbers so that it's easy to see the resulting image. For instance if I just chose the corners of a unit square as my rectification target points, most of the image would be black because the homography would to to squeeze the rectified shape into a single pixel and therefore produce a meaningless image. Finally, I learned that stable photography (without shifts in lighting, translation, etc.) is extremely tough given a lack of equipment (and the lack of ability to procure equipment).