Final Project: Seam Carving and Miniature Faking

Annie Xie (abx)

Seam Carving

Overview

In this project, I implement seam carving to shrink images so that the most important features are preserved in the resizing. The first step is to determine the importance of each pixel with an energy function. Then, finding the lowest-importance seam becomes a dynamic programming problem. We repeatedly remove seams until we have the desired dimension. We can resize an input image in both dimensions by simply transposing the image and performing the same seam finding and carving operations.

Results

Original (Example)
Result
Original (Example)
Result
Original
Result
Original
Result
Original (Source)
Result
Original (Source)
Result

Failed Examples

Original
Result

Because the sky has the least energy in the horizontal dimension, the seam carving becomes a simple crop.

Original
Result

Because of the busy background of this image, the algorithm carves out my neck!

Original
Result

Here, I had hoped that the algorithm would remove seams on the left half of the image, but instead part of our bodies were removed.

Fake Miniatures

Overview

Miniature faking can be achieved by selecting a region of interest and blurring the rest of the image outside of this region of interest. In my implementation, a user can input the desired center point and define the height and width of the region of interest. After these definitons, the algorithm repeatedly applies a Gaussian filter on the rest of the image such that the blurring gradually becomes stronger as you leave the center point.

Results

Original
Result

Taken in Long Beach.

Original
Result

Taken behind Long Beach's Convention Center.

Original (Source)
Result
Original (Source)
Result