CS 194:-26 Computational Photography

Part 1: Seam Carving

Jun Zhou, CS194-26-abm



Algorithm

1. Calculate an energy matrix where the energy function is the sum of the partial derivatives, done in numpy by convolving Sobel filters.
2. Find the minimum seam from one side to the parallel side.
3. Delete all pixels in the minimum seam.
4. Repeat 1-3 until the image is rescaled to the desired dimensions.

Minimum Seam vis-a-vis Dynamic Programming

Horizontal vs Vertical Cutting

Good Selection

The general trend is that landscapes are good samples for seam carving. In portraits, the person is more likely to be part of the minimum seam. Maybe it's to show that people can't be cut out from the grand scope of things.

Bad Selection

Part 2: Dolly Zoom / Vertigo Effect

To make it easier for linear movement and camera stability, I placed the camera on top of two shoeboxes. This allowed for easier motion without affecting the axis of the camera. The field of view on the scene changes depending on the zoom, but by focusing on retaining the position of the object on screen, the background seamlessly changes. I used a Canon t5i to take the pictures. The goal is to zoom into the subject at maximum zoom and then as the skateboard moves closer to the subject, we zoom out to recenter the subject. We can do the same but with zoomed out all the way and going farther away from the subject for the reverse effect.

Human



BELLS & WHISTLES: GIF

Object



BELLS & WHISTLES: GIF