Fall 2018 CS194-26 final project(s)

Jieming Wei

The Vertigo Shot

Description

Dolly Zoom is an image effect created by changing the camera distance from the object while at the same time changeing the camera focal length. As the distance between object and camera increases, the focal length increases so that the object stay in the frame in a relatively same size.

Implementation

The camera I used is Sony A7. The lens I used is f4/16-35mm zoom lens for scene 1 and f4/70-200mm for scene 2. To create better dolly zoom shoot, I think it is important to choose a scene with relatively far away background so that changing field of view can take more effect in the image. In the first scene, I shot an xbox controller in front of the windows. I change focal length from wide 16mm to narrow 35mm while at the same time move camera further from the controller. In the second scene, I shot a road sign. I move closer to the sign as I zoom out from 200mm to 70mm. It is also important but challenging to make sure the object stay at relatively same position so that the animation does not feel shaky.

Result

Scene 1

change focal length from 16mm to 35mm

Scene 2

change focal length from 200mm to 70mm

Bells & Whistles

Animation

Move camera vs move object

change focal length from 16mm to 35mm

Here I compared effect of moving camera and moving object. It turns out that moving object gives more dramatic effect in this case.

Move Object

Move camera

What I learned

Have the object stay at same position in the frame is important to create smooth result. Further stabalization process could improve dollyy zoom effect.

Seam Carving

Description

Seam carving is an to algorithm to shrink the size of an image by remove seams of low energy seam from an image. A seam can either go vertically or go horizontally. The general goal we want to achive is to remove pixals that are not important to our eye and keep as much detail as we want.

Implementation

Seams are picked in an iterative manner. The algorithm is implemented to find vertical seams, so to find horizontal seams, the input image is first transposed and get transposed back after going through the algorithm.

Seams are picked in an iterative manner. The algorithm is implemented to find vertical seams, so to find horizontal seams, the input image is first transposed and get transposed back after going through the algoirthm.

I defind the energy level at each pixal to be the summation of gradient at x-axis and gradient at y-axis at that pixal. The energy level of a seam is defined as the summation of energy of all pixals consisting the seam. Dynamic program is used to find the minimum total energy level up to certain pixal. Then I backtrack to find the seam from the energy calculated and the seam is removed from the image.

If we want to shrink width by n, the algoirthm is run repeatedly for n times. If we want to shrink height by m, the image is transposed and then the algorithm is run m times. Finaly, the image get transposed back before it gets saved.

Result

Remove horizontal seam

The left column shows the original image. The right column shows results after horizontal seams are removed

Remove vertical seam

The left column shows the original image. The right column shows results after vertical seams are removed

Remove horizontal and vertical seam

The left column shows the original image. The right column shows results after both horizontal and vertical seams are removed

Failure result

The algorithm works not so well if I am trying to removed plane with obvious texture. For example, the ground and wall with square textures cannot be removed. As a result, the main object is distorted instead.

What I learned

I learned that algorithm like seam carving is not that hard to implement but really powerful to shrink image size in many of the scenerios. This tells that an algorithm does not necessarily to be complicated to be great. Many things in the world are simple but powerful. I also learned that efficiency is important. Dynamic programing here have helped us to speed up this process in great extent.