CS19426agg
This project was a general levelup from all the projects we've done so far. We're resizing images to stitch them together to construct a panorama!
This part of the project was actually pretty difficult. I ended up scrapping a photo because I couldn't handpick any good correspondances
A homography matrix is a matrix that can calculate changes in projection. With this, we are able to reshape and warp images with multiple degrees of freedom. However, we need a minimum of 4 reference points per image.
To compute this, we have a large matrix with n rows and 9 columns, n being twice the total number of corresponding points. We then append a row of 8 zeros and 1 one to prevent our matrix from just being zero. We multiply that to get the zero vector, with one 1. This ensures that our ninth value in the matrix will always be 1, and we won't just multiply our matrix with the zero vector.
Wit this, we can warp our images to get rectilinear transformations. I used the exit sign and a photo from BAMPFA to straighten into a square. This was done by extrapolating the coordinates of our new image using the homography, and then, for every point, interpolating the new coordinates from our older image




This is where I started running into problems. First off, I started my blending thinking that I was always going to blend from left to right. After all, my image warps took in a left value and a right value. For panorama's of two images, the difference was hardly apparent. But throw another image in, and lo and behold, I was truly done for. The images would go from bad to worse, and I'd end up with a trapezoidal image more than the actual aesthetic insta images.







Once again, I shirked my duty for starting projects early, and ended up with yet another banger. Not understanding the use cases for image warping led to my somewhat unruly downfall. I will be sure to fix whatever I need to before part 2.