CS194 Final Project:

Kristine Lin (ADN), Nerissa Lin (ADV)

This project includes the following three parts

Jump to Fake Miniatures
Jump to Vertigo Shot
Jump to Seam Carving

Fake Miniatures

Jump to Top

Tilt Shift is a really popular effect often employed in apps like instagram to make images feel more artfully composed. We can mimic this effect using some of the techniques we've learned in class and utilize it to make images come across as if they were miniature models of the real thing.


example of camera shot tilt shift

Image Source taken by TDF TS

The image above shows a great examples of Camera Shot tilt shift in images that are super effective. The scene is quite beautiful and comes across miniaturized - an effect we want to emulate with code. This image of Lake Louise was borrowed from the MMM group found here


To create a tilt shift effect, we define a focal distance using the assumption that is inline to a defined line is in fact at the same focal distance. Then we can use this to create a clear, infocus picture there around a predefined depth of field and blur it as we move away from the line. Near the outside edges, the image is extremely blurred.


lake louise, unsaturated gaussian filter

Above is an example of an image that has been blurred in this way, prior to being altered further. Also included is the mask that we use for the Gaussian Filter where the darker parts are the least blurred and the lighter it gets, the more blur percieved


This makes our image seem more miniature. As we play with colour saturation of the image, we can increase the saturation, making the colours more vivid. This vividness is what makes the object look more like a fake miniature than a regular normal object.

Image of Lake Louise Fairmont

lake louise original tiltshifted lake louise

Image of Rooftops taken by Aurimas

Taken from Flickr

rooftops original tiltshifted rooftops

Image of Airbnb Office

airbnb office miniaturized lobby airbnb

Image of SF Bay Bridge

bay bridge miniaturized bay bridge

The Vertigo Shot

Jump to Top

When taking video, its possible to create an effect where upon backing up and zooming in, the perspective lines in the shot are slightly changing. This causes a cool effect mimicing vertigo. We do this with a real zoom camera lens. We take quite a few photos to try to achieve this effect and weave them together into a gif as suggested in the bells and whistles below. First here's a video below demonstrating what a vertigo shot from video looks like. This is commonly used in movies to achieve a sense of suspense or action and looks quite cool!

video vertigo shot

Bottle Vertigo

Most noteworthy in this photo is how the lamp seems to grow larger although the bottle stays the same size and nothing else has moved except the camera

bottle1 bottle2 bottle3 bottle4 bottle5 bottle6

gif bottle

Tsum Vertigo

In this photo Squirtle seemingly menacingly looms over our poor Mickey! In actuality, they've maintained distance and haven't moved

tsum1 tsum2 tsum3 tsum4 tsum5 tsum6 tsum7

gif tsum

Moving Baymax

Attempting a bells and whistles, we move the character of interest see what happens - we move our tiny baymax forward with our camera as we move back and we see that slowly, instead of the large baymax looming, we end up with what seems like two similar sized baymaxes!

baymax3 baymax4 baymax5 baymax6

gif baymax

Seam Carving

Jump to Top

Do execute seam carving, we successively removed the minimum energy seams using dynamic programming, where "energy = dx^2 + dy^2" indicates edges or visually important scenes. We then implemented vertical seam removal and horizonal seam removal. Horizontal seam removal is done by transposing image and then remove vertical seam, then, transpose image back. In total, the steps include:

  1. Find pixel energy (=dx^2 + dy^2) for the given image
  2. Find seam: Use recursion to find minimum cumulative energy seam
  3. Delete seam

Repeat 1, 2, 3 until you have removed the number of requested pixels.

Image Example #1

Here you have the original image, image carved horizonally, image carved vertically, and image carved both horizonally and vertically. You can see where the seam was set due to the slight distortion of the table.

seam_carving1 seam_carving1 seam_carving1 seam_carving1

Here are the before and after of images carved in both directions.

Image Example #2

seam_carving_org cropped_im1

Image Example #3

seam_carving3 seam_carving3

Image Example #4

seam_carving4 seam_carving4

Image Example #5

seam_carving5 seam_carving5

Image Example #6

seam_carving6 seam_carving6

Image Example #7

seam_carving8 seam_carving8

Seam Carving Failures

If you remove too many pixels, you will bound to see discontinuities at some point such that severe artifacts may appear, or if you choose images that have many edges across the entire image, then, there is no good seams to remove (i.e., any seam you remove is going to affect edges, and the human visual system is very sensitive to edges). It seems that the following examples ended up to be failures.

Image Example #8

The zebra has too many edges across the entire image and the program is unable to remove the right edges while keeping the image comprehensive. You can see that the zebra's face is rather distorted.

seam_carving7 seam_carving7

Image Example #9

With the flower, especially with the diagonal stem, the seam carving is unable to keep the line continuous and straight.

seam_carving2 seam_carving2

Example Sources

https://www.flickr.com/photos/leendert3/, https://www.flickr.com/photos/kei_piacevole/, https://en.wikipedia.org/wiki/Seam_carving

Seam Carving Summary

I've learned a lot about the process of seam carving in this part of the project. It was very interesting applying concepts learned in the past such as dynamic programming and having it applied on images. Although some results turned out a little odd, overall, it was very satisfying to watch these images be morphed into comprehensive results that could at times trick the eye into thinking it is an untouched image.

Jump to Top