CS 194-26: Project 4A

By Prangan Tooteja

Shoot Pictures

The goal of this task was to shoot images from the same point of reference. For this, I used a tripod and a digital camera to capture the images. Below are the images I used for this project.

Image with Points
Points
Image with Points
Points
Image with Points
Points

Recover Homographies

The goal of this task was to recover a homography matrix for each pair of images to stitch together. This resource source contains good explanations of how the matrix can be found given two sets of matching points. To summarise, we wanted to find a matrix such that we could put our transformation into the form: p' = Hp. Below is the simple form of the matrix which is then expanded into the second, larger calculation that we can solve for using least squares.

Warp the Images (Rectified Images)

Given the homography matrix, define correspondences by defining points that would appear to rectify the input image. Below are two pairs of images, one of a notebook and the other of a mirror that have been rectified so that they appear to be directly facing the camera.

Notebook
Rect Notebook
Mirror
Rect Mirror

Blend Image into Mosaic

The goal of this task was to use the images from the same point of reference and blend them into a mosaic. To blend the image I used an alpha mask as suggested so that every image had an equal contribution towards the output image.

Image with Points
Points
Points
Image with Points
Points
Points
Image with Points
Points
Points

Coolest Thing You've Learned + Bells and Whistles

[EDIT] I should have looked at Part B earlier - I didn't realize that we would be implementing this ourselves in the next part. Still cool though While going through the documentation on skimage and opencv I came across a suite of corner detectors which could be used to automatically generate points on images. I tried using them on my images but the points don't always match perfectly. These are the results I got from the generated points. Here is the tutorial that I followed to learn about the skimage ORB feature link

Image with Points
Image with Points
Image with Points

CS 194-26: Project 4B

By Prangan Tooteja

Automatically Detect Correspondences

After completing the first part of the project as well as exploring the automatic correspondence generators offered by OpenCV and skimage, it was fairly clear that the main bottleneck in my implementation was the necessity of manually labelling points. In this part, we used Harris corners followed by ANMS to reduce the number of detected corners. After this we generated 40x40 pixel descriptors which we blurred to 8x8 to try to detect the similarity between points. We use feature matching with these descriptors to identify correspondences between points, using Lowe's thresholding to discard weak matches. Below are the results of the project with original images, Harris Points, ANMS filtered points and RANSACed points.

Image
Image
Points
Points
Ransac Points
Image
Points
Points
Ransac Points
Image
Image
Points
Points
Ransac Points
Image
Points
Points
Ransac Points
Image
Image
Points
Points
Ransac Points
Image
Points
Points
Ransac Points
Image
Image
Points
Points
Ransac Points
Image
Points
Points
Ransac Points

Coolest Thing You've Learned

I thought RANSAC and Feature Matching with Lowe's thresholding were cool because they are non-deterministic algorithms for defining correspondences that rely on computing the probability that two features or two points represent the same spot in the real world. While a lot of the ideas we explored in 189 also rely on calculating probabilities, this was a more application that I hadn't thought about before.