CS194-26 Final Project: Fake Miniatures and Dolly Zoom

By: Shaan Appel (-abu)


Contents:

Fake Miniatures

Background and Approach

In this project we simulate the effect of selective focus cameras, known as tilt shift. By narrowing the perceived DOF in the scene, we create the illusion that the lens is very close to the subject. We also saturate the image colors to create a surreal look that appears to be a miniature scene. To achieve this we do the following:

  1. Select a focus line. (We use a horizontal line defined by the y-component of a selected point)
  2. Define the size of the fake DOF. We take in two points, corresponding to the top and bottom of the region in focus.
  3. Increasingly blur the image around the focus region to simulate DOF effect.
  4. Increase image saturation to make it look more surreal, like a diorama.

Results on Internet Images:

All internet images are taken from https://pixabay.com/en/. These photos are public domain and free to use. Here we show the results of our algorithm using a basic horizontal line. (We also get vertical lines by transposing the images when we feed them in).

Belgium Original

Belgium Miniature

Bridge Original

Bridge Miniature

Capitol Original

Capitol Miniature

Cityscape Original

Cityscape Miniature

Coast Original (Vertical Focus Line)

Coast Miniature (Vertical Focus Line)

Train Original

Train Miniature


Results on My Images:

These photos are taken by me with a DSLR from the top of the Campanile. Here we show the results of our algorithm using a horizontal focus line.

Berkeley 1 Original

Berkeley 1 Miniature

Berkeley 2 Original

Berkeley 2 Miniature

Berkeley 3 Original

Berkeley 3 Miniature

Berkeley 4 Original

Berkeley 4 Miniature



Bells and Whistles:

1. Complex DOF Regions

Instead of focusing around a simple focus line, we can define more complex DOF regions. I use the "grabCut" function from OpenCV to define an irregular mask around a foreground object. I then define a bounding box around this mask and increasingly blur the image by taking larger boxes around the bounding box as my blur regions. See the result below:

Original Castle Image

Mask extracted with "grabCut" function

Final Miniature with irregular mask


2. Stop Motion

Since the images are made to look like a miniature diorama, we can stitch several together to create a short stop motion film. Here we show a couple results with images taken from the Campanile.

Berkeley Stop Motion 1

Berkeley Stop Motion 2



Summary

  1. I had a lot of fun with this project. I think the coolest part was taking my photos from the Campanile and turning them into little dioramas.
  2. The hardest part of this project was getting the complex DOF regions to work. The "grabCut" function often grabs extra bits of the bakground and took some fiddling to make work properly.



Dolly Zoom

Background

In this project we duplicate the famous in-camera effect known as the dolly zoom. It is also known as the "Vertigo shot" as Hitchock used the effect several times in the film Vertigo.

Process

To capture this effect I used a DSLR, specifically a Nikon D5300 with an 18-55mm lens. I achieved the effect by starting close to the object zoomed all the way out. I then step away from the object while zooming in, such that the object stays in focus and the same size in the frame. You can also do this in reverse. When you are close you have a large FOV, and when you are far you have a small FOV. I will show results for what it looks like when zooming in or zooming out.

When it came to choosing locations, I walked around campus looking for large items that would be easy to keep in focus and were approximately at head-height so I wouldn't need to bend down or look up. I particularly liked the "4.0 ball" in front of the Campanile as the trees behind it create a nice line, which highlights the zoom effect.

Image Sequences:

Here we show two dolly zoom sequences as images:

4.0 Ball

Ball 1

Ball 2

Ball 3

Ball 4

Ball 5

Ball 6

Ball 7

"Death Star" Sculpture

Ball 1

Ball 2

Ball 3

Ball 4

Ball 5

Ball 6

Ball 7

Ball 8

Ball 9

Zoom Gifs

We stitch together all of our dolly zoom image sequences to create gifs where you can see the full zoom effect!

4.0 Ball Dolly Zoom (Stepping Forwards While Zooming Out)

4.0 Ball Dolly Zoom (Stepping Backwards While Zooming In)

Death Star Sculpture (Stepping Backwards While Zooming In)

Hearst Mining Circle Pools(Stepping Backwards While Zooming In)


Summary

  1. I had a lot of fun with this project. I think the coolest part was seeing the final effect in a gif form.
  2. I faced several difficulties in getting nice shots for the dolly zoom effect:
    1. Finding good items took quite a while. I couldn't take pictures of big things like buildings as they would always be too far. I couldn't take pictures of small things as the movement was very sensistive. Human-sized sculptures seems to be the best option
    2. Keeping the camera steady was very difficult. The effect is called a "dolly zoom" because one would normally use a dolly or some device on which the camera is mounted and can be moved smoothly back and forth. I didn't have a tripod or anything on wheels. I just tried to stay steady and keep my shots in a straight line so the object in focus wouldn't move too much between frames.