Aarav Patel
In Project 4A, we explore image warping and moasicing. Specifically, we shoot and digitize pictures, recover homographies, warp the images, and finally blend them into a mosaic. In Project 4B, we explore feature matching and autostitching. Specifically, we automatically detect corner features in an image, extract a feature descriptor for each feature point, match the feature descriptors between two images, use RANSAC to compute a homography, and finally blend the images into a mosaic similar to Project 4A.
I choose 3 sets of images: 1) my living room at home, 2) the view from my balcony in Berkeley, 3) my kitchen at home.
In order to recover the homography matrix H between two images, I had to define the correspondence points. For this task, I used the tool provided in Project 3. For our system, we only required 4 points to solve through least-squares. However, I used 8 points to yield an over-determined system and protect against instability. I solved the least-squares problem using SVD. I then normalized the solution and returned H.
In this part, I wrote the image warping function. It first determines the new image corner positions, then calculates the bounding box of the warped image, and finally uses inverse warping to map pixels from the warped image back to the original space. Below, I've applied my warp function for rectification. In the first case, I'm rotating my laptop screen towards the viewer. In the second case, I'm rotating the "I love CS 180" sign on my desk so it is readable by the viewer.
In this part, I warped and then blended the images in every set to create a mosaic with the manual correspondences. Here are my results.
Here, I used the Harris Interest Point Detector to detect the corner points in each image of each set. Here are my results.
I then applied Adaptive Non-Maximal Supression to filter the number of points and ensure they are uniformly distributed over the image.
In this part, I extracted a feature descriptor for each feature point that was left after Adaptive Non-Maximal Supression. This is done by first observing a 40x40 window and then sampling an 8x8 feature descriptor.
Here, I implemented feature matching between the descriptors of two images by thresholding on a Lowe's ratio of 0.6. Here are the potential matches. Please note that there are still some outliers–– which will be dealt with by RANSAC in the next part.
Here I implemented 4-point RANSAC as described in class to compute the most likely homography. I then blended the image sets to form mosaics and comapred to the results from Project 4A.
Overall, the coolest thing I learned from this project was automatic feature matching. It was mind-blowing to see how realtively simple methods can be used to autostitch images together. These methods were developed before the days of deep learning, which I also found very interesting.