Fake Miniatures
The goal here is to simulate the effect of selective focus cameras and create fake minatures!
First I select a focus plane by identifying the row on the image that I wish to be in focus.
From there I mask a region above and below that plane, and blur the rest of the image.
I blur regions further away from the focus line more.
I implemented this using a gaussian filter on the regions furthest from the focus line first.
I then used used alpha blending between the blurred image and the original at the region where they differed, to avoid obvious seams between the regions of greater or lesser blurring.
I repeated this several times, increasing the region from the top and bottom that gets blurred.
This results in greater blurring for the regions furthest away, and less for closer regions.
Results
My Images
Original
|
Miniaturized
|
Original
|
Miniaturized
|
Other Images
Original
(http://www.europealacarte.co.uk)
|
Miniaturized
|
Original
(https://www.travelandleisure.com)
|
Miniaturized
|
Bells and Whistles: Miniature Animation
Some mini cars driving by Evans
Seam Carving
The goal here was to reduce a dimension of the image while retaining the important informatoin.
To do this I remove seams, either vertically or horizontally, that have the least importance.
To determine importance I first create an energy function.
My energy function finds the difference of one pixel from the average of a small number of neighboring pixels.
This results in greater energy for those pixels that differ greatly from their surroundings.
I then search for low energy seams from one side of the image to the other, vertically or horizontally, using dynamic programming.
Once I determine the seam with the lowest energy, I remove those pixels in the seam. For each image I repeat this 150 or 200 times.
The result should reduce the size of the image in one direction but should have a different effect than cropping or shrinking the image.
Results
Trees
Original
|
Removed 200 horizontal seams
|
Removed 200 vertical seams
|
GIF of vertical seam removal
Beach
Original
|
Removed 200 horizontal seams
|
Removed 200 vertical seams
|
Paintings
Original
|
Removed 150 horizontal seams (Fail case)
|
Removed 150 vertical seams
|
Campus
Original
|
Removed 150 horizontal seams (Fail case)
|
Removed 150 vertical seams
|
Rocks
Original
|
Removed 150 horizontal seams
|
Removed 150 vertical seams
|
Friends
Original
|
Removed 150 horizontal seams (Fail case)
|
Removed 150 vertical seams (Fail case)
|
Conclusion
I had a lot of fun with these projects. The miniatures were relatively easy and resulted in very cute images.
The seam carving was very interesting. The resulting images were able to retain the main parts of the image while still reducing the size.
For many, such as the paintings on the wall, this had the effect of essentially moving the items closer together.
However, there are definite shortcomings of this method. The picture of my friends for example, did not work well because most of the image was occupied by essential information.
Additionally, even the slightest distortion in a face if very noticeable. Overall I really enjoyed these projects and the class as a whole this semester. Happy Holidays!