CS194-26 Computational Photography:
Image Warping and Mosaics (Part 1)

Dante Tam





In this project, we examine frequency blending, Gaussian stack multiresolution blending, and Poisson blending, as methods to seamlessly blend images together. The results are entertaining, profound, and deeply expressive.

In this project, we build beautiful, wide-reaching panoramas composed from multiple source images warped together by homographies (pixel correspondences).

Source Digitized Images

I took my Nexus 6 smartphone camera and shot beautiful, wide shots, with custom, standard settings. Particularly, shots from far distances produce effectively planar images, which can be used for panorama reconstructions.

Right off the path of the Big C, looking east towards the forest outside Lawrence Lab (72 dpi, f/2, 1/154s, ISO-40, 4mm)




Downtown San Francisco, viewed from Bernal Heights (72 dpi, f/2, 1/2084s, ISO-40, 4mm)




Recovering Homographies

As seen in my accompanying source code, we set up the equations and solve for the homography constants $[a, ..., h]$,

$ ax + by + c = wx' $

$ dx + ey + f = wy' $

$ gx + hy + i = w, i = 1 $

$ ... $

$ a(...) + ... + h(...) = ... $

This is a least squares problem which is fully determined (i.e. uniquely solvable) by a certain $n$ correspondences, which produces $2n$ equations, one each for the x and y dimensions. When this problem is overdetermined, we solve the equation as follows, where A and B are the hand-determined correspondences.

$AH \approx B \rightarrow minarg_H \vert \vert AH - B \vert \vert^2_2 $




Linear Blending, Final Panorama

To merge the images together, I copied the left and right images onto two canvases. Then, I warped the right image to its correct place.







I merged the images together using a linear (additive) alpha mask, seen in my code.