CS 194-26: Image Manipulation and Computational Photography

Fake Miniatures

Clarence Lam and Florin Langer, Fall 2018

Overview

In this project, we create fake miniatures by simulating the tilt-shift effect produced by selective-focus cameras. This effectively narrows the depth of field perceived in a scene, thereby creating an illusion of proximity between the lens and subject. We set a focus line by selecting points in an image, define the size of the simulated depth of field with respect to the focus plane, and blur the image in a weighted manner around the focus plane. We go further and define custom masks for scenes that have more complex shapes. Finally, the image saturation is also increased by 30% to increase the illusion of a miniature.

To achieve the gradual blurring effect, Gaussian blur is applied to several iterations of the image, with the focus mask (defining the area that is not successively blurred in that iteration) expanding about the focus line.

Results

The second and third examples below were taken by us at the Big Game this year, and the rest are photos of Hong Kong from Bamboo Scenes and Andy Yeung. Open images in a new tab or zoom in for better effect and greater difference between the original and the miniature/boosted versions.

Original Hong Kong Tram
Miniature
Miniature with Boosted Saturation 30%
Original Stadium
Miniature
Miniature with Boosted Saturation 30%
Original Field
Miniature
Miniature with Boosted Saturation 30%
Original Fuji
Miniature Mask
Miniature
Miniature with Boosted Saturation 30%
Original ICC and Victoria Harbor
Miniature
Miniature with Boosted Saturation 30%
Original Temple Street
Miniature
Miniature with Boosted Saturation 30%

Complex DOF Regions

As a bell and whistle, we create a tool with matplotlib.pyplot.ginput for the user to define complex DOF regions (AKA complex polygonal masks). You can see above that all of the "Miniature" and "Miniature with Saturation Boost" examples are done with complex regions in focus. It is most apparent in the Mt. Fuji example and the Hong Kong ICC building example.