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.
Because the sky has the least energy in the horizontal dimension, the seam carving becomes a simple crop.
Because of the busy background of this image, the algorithm carves out my neck!
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.
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.
Taken in Long Beach.
Taken behind Long Beach's Convention Center.