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:
Here is an test image provided to us, as a sanity check:
|
|
Here is a minitiarized image of monaco src:
|
|
Here is a miniaturized cityscape src:
|
|
Here is a picture of some bikes I took:
|
|
Here is a picture of some Trashcans:
|
|
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.
Here is a boat in the ocean resized 40% smaller src:
|
|
Here is a snowy scene that is resized 40% smaller src:
|
|
Here is a picture of Doe Library reduced by 30%:
|
|
Here is a picture of the pyramids shrunk to half the size src:
|
|
Here is a picture of Forest Gump shrunk to half the size src:
|
|
Here is a clock tower shrunk by 30% src:
|
|
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.
|
|
|
|
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.
Thanks to http://bettermotherfuckingwebsite.com/ for the styling.