Shoot the Pictures

This section showcases an accumulation of all the images I have taken on campus.

Recover Homography Theory

This section describes the theory behind recovering homography matrices, which allow transformations between two planar perspectives. This is achieved through a set of correspondence points that create a system of linear equations, which can be solved using least squares when there are more than four correspondences.

Homography Transformation

wx wy w = a b c d e f g h 1 x y 1

Rectification

The homography algorithm described above was used to rectify images, transforming them to align with a desired viewpoint. The following gallery showcases examples of rectified images. A known square coordinate was passed in and the input image was transfomred to fit that square.

Mosaic Creation

The mosaic images were created by applying homographies to a set of images and stitching them together seamlessly. Below are three examples of mosaics generated using two base images and the resulting combined image. The first two are original, and the last is the combined image. The mosaics were constructed by using correspondence points to construct a least squares system and solve for the perspective transformation matrix. The transformation was applied to one image and stitched to the other.

Harris Corner Detector

Here we utilize the Harris Corner Detector to isolate distinct points in our image. These "distinct points" often correspond to the human definition of an edge but do not always have to. These points are usually characterized by high derivatives in the image.

ANMS

Here, we utilize the Harris Corner Detector to isolate distinct points in our image. These "distinct points" often correspond to the human definition of an edge but do not always have to. These points are usually characterized by high derivatives in the image.

Feature Matching

Using the key points we obtained from the ANMS, we can now match them to the original image. We extract 40x40 segments surrounding the keypoint from low frequency versions of both images and downscale those patch. These patches are then compared to patches in th other image using L2 norm. each match is score based on the similarity of the 1st nearest neighbor over the second nearest neighbor. Below are some examples of the image patches as well as correspondences.

RANSAC

We now use the RANSAC algorithm to pick the best correspondences for perspective transform generation. With 1000 iterations of picking 4 points at random from the correspondence list and computing a transformation, we can determine the number of inliers and outliers for that transformation based on an L2 norm and a threshold. The transformation solution with the most inliers is the one we want.

Base Image 1
Base Image 2
Combined Mosaic Image