CS 194-26 Final Projects

cs194-26-aek

Table of Contents


Project 1: Fake Miniatures


Introduction

For this first project, we create fake miniature photos by simulating the effect of tilt-shift lenses. We can do this by setting a plane or focus line that we want to use as our depth of focus, and then increasingly blur the photo as we move away from this focus line. The resulting photos simulate a very narrow depth of field and give the illusion that the viewer is looking at a miniature toy version of the scene!


Approach

Since it is not possible to get exact depth information from a two-dimensional picture, we must manually provide a line of focus that will be the center of our depth of field. To create the miniature effect, we apply Gaussian filters with increasing sigma values as we move further away from the focus line. This will cause the image to become increasingly blurred farther from the focus line and produce a narrow depth of field effect. The algorithm is as follows:

  1. Select the line of focus.
  2. Create a mask based on this line of focus, and apply a Gaussian to it for blending.
  3. Create a Gaussian stack of the original image.
  4. Using the mask, blend pixels of the image together using the appropriate level of the Gaussian stack (based on the distance from the focus line).

Here are some results!

Ocean (source)
Ocean, miniaturized
Church (source)
Church, miniaturized
Village (source)
Village, miniaturized
San Francisco (source)
San Francisco, miniaturized
Greece (source)
Greece, miniaturized

Project 2: Vertigo Shot

Introduction

In this project, we aim to duplicate the famous dolly zoom effect, also known as the "Vertigo shot". To duplicate this effect, we use a DSLR camera and take advantage of zooming and focusing techniques.


Approach

To achieve the dolly zoom effect, it's best to use a subject that is stationary and can be easily centered, and have a background that is varied (as opposed to a blank wall). This way, we can clearly see the effects of the background changing as we zoom in to our subject. To take the photos, I chose a few feature points and tried to make sure they stayed in the same location in the frame for each photo I took. Then I gradually moved closer to the subject while zooming out and manually adjusting the focus of the camera.

Results

Here are some images I took for the dolly zoom effect!


We can see that as we zoom out, the items in the background appear smaller, even though the real distance between the subject and the item in the background has remained unchanged! This is a cool effect of the dolly zoom!


Bells and Whistles: GIFs

Below are some gifs I made from these images.

Bells and Whistles: Combinations of Moving the Subject + Camera

I also experimented with moving the subject and camera while applying dolly zoom. Here are some results:

For this experiment, I tried moving the pig while keeping it in the same location in the frame and also applying the dolly zoom effect. The result is similar to the original dolly zoom, but seems even more disorienting since the pig is also moving.

For the second experiment, I tried taking a picture of the window at different distances and zooming so that it stayed in the same location in the frame. It achieved kind of a "reverse dolly" zoom effect, where you can see the tree get closer and closer, even though the window appears to be in the same location.