CS194-26 Computational Photography:
Fake Miniatures

Dante Tam





For the first part of the assigned finals, we implement a seam carving algorithm. First, I calculated the energy of a pixel as roughly

$$ E(x,y) = \vert \frac{d}{dx} I(x,y) \vert + \vert \frac{d}{dy} I(x,y) \vert $$

Then, we use the dynamic programming algorithm presented in the Seam Carving paper to calculate the least "energetic" seam, which is removed from the image.

Good Seam Carving Results (6)

Doe Library, front, source: Flickr, K. Oliver





Golden Gate Bridge, source: Wikipedia Commons





"Sail Boat in Water", source: Pixabay, "Mariamichelle"





Three rabbits, source: People.com





July 4th fireworks over Marina Del Rey, CA, source: visitmarinadelrey.com





Yakushima Forest, source: artsimon.com





Questionable Seam Carving Results (3)

Golden Gate Bridge, source: sftravel.com





Doe Library, source: vox





Mt. Zion National Park, source: utah.com, tourism promotion





In this project, we use a simple Y distance heuristic to approximate a depth of field, which we use to generate fake miniatures, or tilt shift pictures.

My tilt shift algorithm works by assigning a "blur" level to certain rows. Once the "blur mask" is calculated, I generate a Gaussian stack with different levels of blurs in between. I sample every pixel of the new image copy, from the appropriate level in the Gaussian stack. Ideally, points further away from the focus line are more blurry, which simulates a depth of field.

Tilt Shift Results (4)



Mt. Zion National Park, source: utah.com, tourism promotion





SF panorama centered near downtown and the Ferry Building, source: shutterstock.com, aerial drone shot of SF