Project 5a: Image Warping & Mosaicing

Harish Palani (CS 194-26)

1.   Shoot the Pictures

For this project, I used the following three perspectives captured at a local park here in Portland, Oregon. These shots all revolve around a basketball hoop, which forms a key focal point to be used when aligning images for stitching.

<matplotlib.image.AxesImage at 0x1cf0003d430>

I chose to blend the center and right perspectives, zeroing in on three objects present in each perspective: the basketball hoop, the lamppost, and a street sign in the background. The final points selected for alignment can be seen below.

[<matplotlib.lines.Line2D at 0x1cf13556520>]

2.   Recover Homographies

With correspondences defined by hand as shown above, I had to recover the parameters of the transformation between the two images to properly inform subsequent warping & rectification steps. The resulting homography matrix H is shown below.

 0.664500 -0.003568  328.585141
-0.100352  0.856832   35.824939
-0.000295 -0.000003    1.000000

3.   Image Warping & Rectification

Warping and rectification algorithms for this part were tested on the right perspective displayed above, with the warped output ultimately blended wtih the center perspective in the final mosaic. Results for this section are shown below.

<matplotlib.image.AxesImage at 0x1cf00251730>

4.   From Image to Mosaic

To form a realistic mosaic from these two perspectives, I kept the center perspective unchanged and blended it with the warped version of right perspective as shown above. This yields the following raw output — not bad!

<matplotlib.image.AxesImage at 0x1cf005a2340>

Cropping yields the following final output, with minimal artifacts at first glance. Upon closer inspection, the misaligned windows and lamppost in the background — along the seam of the two perspectives — reveal themselves to be perhaps the most glaring errors present.

<matplotlib.image.AxesImage at 0x1cf005f1700>

What you've learned (so far): This has been an incredibly interesting project with many practical lessons. Perhaps the coolest of all has been developing an general understanding of homographies and mosaicing, both of which lie at the core of the panorama feature used on smartphone cameras every day — not to mention photo spheres, Google Street View, and other incredible innovations!