Final Project - Austin Leung

Fake Miniatures

Vertical Depth of Fields

In this part, I used ginput to select the area of focus. Then, I blurred sections that were horizontally or vertically a given distance from that point, which were determined by the depth of field parameter. The closer region was blurred with a smaller guassian kernel, and the further region was blurred with a slightly larger guassian kernel, to get a more blurred effect.

Colosseum: Before and After

This image comes from Travel and Leisure, and can be found at http://cdn-image.travelandleisure.com/sites/default/files/1487894690/interior-rome-colosseum-italy-ARENA0217.jpg. I used a vertical depth of field to blend away the stands on the right and left, and focus on the center of the Colosseum.

Golden Gate: Before and After

I took this photo back in 2015, when a couple friends and I were hiking up in the hills around Crissy Field in San Francisco. My friend was trying to take a picture of the surroundings, and I caught him mid-action. Here, I create a vertical depth of field to blur away the background and put my friend in focus.

Horizontal Depth of Fields

San Francisco: Before and After

This image comes from the San Francisco Chronicle, and can be found at http://ww4.hdnux.com/photos/60/06/21/12608583/5/920x1240.jpg. I used a horizontal depth of field to focus on some of the buildings in the foreground, an blur away those in the back.

Warriors Game: Before and After

I took this photo back in 2014, as you can see Durant was still playing for OKC, when I went to a Warriors game with my family. Here, I used a horizontal depth of field to focus on the players and blur away the crowd.

Bells and Whistles

In this part, I created a stop motion gif of me eating a quesadilla. It's not exactly a fake miniature, but it uses the same blurring effect. If you pay close attention, you can see that I drink some of the water as well.

Seam Carving

In this part, I summed the absolute values of the grayscale x and y gradient to get an energy matrix. Then, I used dynamic programming to find the vertical or horizontal seam along the energy matrix that had the smallest energy. Then, I removed this seam, and repeated until I had removed a sufficient number of seams. In writing my code, I modelled some of the dynamic programming part of seam carving off of Sameep Tandon's open source work, found at https://github.com/sameeptandon/python-seam-carving/blob/master/CAIS.py

Working Examples

Horizontal Seam Carving - Jaffa Port: Before and After

This is an image of Jaffa Port off the coast of Israel. The image is taken from Wikipedia, and can be found at https://upload.wikimedia.org/wikipedia/commons/thumb/4/42/OLD_JAFFA_PORT.jpg/1200px-OLD_JAFFA_PORT.jpg

Horizontal Seam Carving - Campanile at Night: Before and After

This is an image I took of the Campanile for Project 6

Horizontal Seam Carving - Halloween: Before and After

This is a photo of my roommate during Halloween of 2015

Vertical Seam Carving - Broadway Tower: Before and After

This image is taken from Wikipedia, and can be found at https://upload.wikimedia.org/wikipedia/commons/c/cb/Broadway_tower_edit.jpg

Vertical Seam Carving - Basking Shark: Before and After

This image is taken from National Geographic, and can be found at http://media-channel.nationalgeographic.com/media/uploads/photos/content/video/2015/08/26/513742403772_513742403772_1080i_25_Breeching_Basking_Sharks_DMS.jpg

Vertical Seam Carving - Sunrise on Berkeley: Before and After

I took this photo back in 2014 for another class

Failed Examples

Failed Horizontal Seam Carving - Stairs: Before and After

This image comes from Wikipedia, and can be found at https://upload.wikimedia.org/wikipedia/commons/4/45/Macdonaldtown_Railway_Station_stairs_to_platform.jpg. While this seam carving mostly works, you can see the railing on the sides gets chopped up and doesn't quite look right.

Failed Vertical Seam Carving - Golden Gate: Before and After

This is a picture I took while hiking back in 2015. Here, the dark shadow of my friend is interpreted as having the least energy, since it is a solid color and has little to no gradients. As a result, it is removed during seam carving.