CS 194-26

Miniatures

Rosa Choe & Marisa Wong

Overview

Tilt shift is an effect that makes images look like toys or miniatures by simulating a large depth-of-field.

Methods

We define a focus line using ginput and define a fake depth of focus for our image. Next we create a Gaussian stack of the image. We iterate through each pixel of the image and determine the distance from the focus line. Depending on how far it is, we take the k-th Gaussian from the stack and place that pixel into our output image. If the pixel is within the focus line and depth of focus, we just extract that pixel from the original, unblurred image.

Results

Original Miniature
Waterfront
New York City
Seals
San Francisco
Cabo