Final Project Showcase

By Anish Prabhu

 

Project 1: Fake Miniatures

Approach

In this project, we will digitally simulate the effect of selective focus cameras, or Tilt shift, to produce Fake Miniatures. We will first allow the user to select a plane of focus, along with a desired depth of field for the image. We will then perform adaptive blending to create the desired miniature and finally change the saturation. We use the following procedure:

Steps:

  1. Retrieve Depth of Field and Plane of Focus from User.
  2. Adaptively blur the regions above and below more as they move away from the focused mask.
  3. Convert the image to the HSV color space and increase the saturation.

Results

Here is an test image provided to us, as a sanity check:

original Test Image
Miniture Test Image

Here is a minitiarized image of monaco src:

Original Monaco
Miniture Monaco

Here is a miniaturized cityscape src:

Original Cityscape
Miniture Cityscape

Here is a picture of some bikes I took:

Original Bikes
Miniture Bikes

Here is a picture of some Trashcans:

Original Trashcans
Miniture Trashcans
 
 

Project 2: Seam Carving

Approach

In this project, we explore seam carving as a way to dynamically resize images by iteratively removing seams. To do this, we will define some energy function to measure the value of each pixel, which in this case we choose the simple Sobel filter, then remove the seams which have the lowest energy.

Enumerating every single possible seam is computationally infeasible for large images, so instead we use a Monte Carlo style greedy approach. For a set number of iterations, scaled by the image size, we randomly select a starting column to begin our carving. To choose the next pixel for each seam, we calculate the energies of the possible next pixels, then use a softmax of these energies as the probability of choosing each of the next possible paths. This affords us a way to navigate the tradeoff between exploration and exploitation.

Results

Vertical Seam Carving

Here is a boat in the ocean resized 40% smaller src:

original Boat
Carved Boat

Here is a snowy scene that is resized 40% smaller src:

original Snow
Carved Snow

Here is a picture of Doe Library reduced by 30%:

Original Doe
Carved Doe

Horizontal Seam Carving

Here is a picture of the pyramids shrunk to half the size src:

Original Pyramids
Carved Pyramids

Here is a picture of Forest Gump shrunk to half the size src:

Original Forest
Carved Forest

Here is a clock tower shrunk by 30% src:

Original Clock Tower
Carved Clock Tower

Failures

Here are some examples of cases of failure, due to a combination of the energy function used not incentivizing the seams to avoid features enough, especially those of humans, as well as carving away too much of the image. Images with a lot of edges, or important features, are also less suited for seem carving.

Failed Golden Field
Failed Indian Street
Failed Gazelle
Failed Man and Daughter

Conclusion

These projects allowed us to use fairly simply techniques, such as dynamic programming, to achieve some pretty fantastic results! I had a lot of fun with these projects, and the semester as a whole.

Source

Thanks to http://bettermotherfuckingwebsite.com/ for the styling.