This project includes the following three parts
Jump to Fake MiniaturesTilt Shift is a really popular effect often employed in apps like instagram to make images feel more artfully composed. We can mimic this effect using some of the techniques we've learned in class and utilize it to make images come across as if they were miniature models of the real thing.
Image Source taken by TDF TS
The image above shows a great examples of Camera Shot tilt shift in images that are super effective. The scene is quite beautiful and comes across miniaturized - an effect we want to emulate with code. This image of Lake Louise was borrowed from the MMM group found here
To create a tilt shift effect, we define a focal distance using the assumption that is inline to a defined line is in fact at the same focal distance. Then we can use this to create a clear, infocus picture there around a predefined depth of field and blur it as we move away from the line. Near the outside edges, the image is extremely blurred.
Above is an example of an image that has been blurred in this way, prior to being altered further. Also included is the mask that we use for the Gaussian Filter where the darker parts are the least blurred and the lighter it gets, the more blur percieved
This makes our image seem more miniature. As we play with colour saturation of the image, we can increase the saturation, making the colours more vivid. This vividness is what makes the object look more like a fake miniature than a regular normal object.
Taken from Flickr
When taking video, its possible to create an effect where upon backing up and zooming in, the perspective lines in the shot are slightly changing. This causes a cool effect mimicing vertigo. We do this with a real zoom camera lens. We take quite a few photos to try to achieve this effect and weave them together into a gif as suggested in the bells and whistles below. First here's a video below demonstrating what a vertigo shot from video looks like. This is commonly used in movies to achieve a sense of suspense or action and looks quite cool!
Most noteworthy in this photo is how the lamp seems to grow larger although the bottle stays the same size and nothing else has moved except the camera
In this photo Squirtle seemingly menacingly looms over our poor Mickey! In actuality, they've maintained distance and haven't moved
Attempting a bells and whistles, we move the character of interest see what happens - we move our tiny baymax forward with our camera as we move back and we see that slowly, instead of the large baymax looming, we end up with what seems like two similar sized baymaxes!
Do execute seam carving, we successively removed the minimum energy seams using dynamic programming, where "energy = dx^2 + dy^2" indicates edges or visually important scenes. We then implemented vertical seam removal and horizonal seam removal. Horizontal seam removal is done by transposing image and then remove vertical seam, then, transpose image back. In total, the steps include:
Repeat 1, 2, 3 until you have removed the number of requested pixels.
Here you have the original image, image carved horizonally, image carved vertically, and image carved both horizonally and vertically. You can see where the seam was set due to the slight distortion of the table.
Here are the before and after of images carved in both directions.
If you remove too many pixels, you will bound to see discontinuities at some point such that severe artifacts may appear, or if you choose images that have many edges across the entire image, then, there is no good seams to remove (i.e., any seam you remove is going to affect edges, and the human visual system is very sensitive to edges). It seems that the following examples ended up to be failures.
The zebra has too many edges across the entire image and the program is unable to remove the right edges while keeping the image comprehensive. You can see that the zebra's face is rather distorted.
With the flower, especially with the diagonal stem, the seam carving is unable to keep the line continuous and straight.
https://www.flickr.com/photos/leendert3/, https://www.flickr.com/photos/kei_piacevole/, https://en.wikipedia.org/wiki/Seam_carving
I've learned a lot about the process of seam carving in this part of the project. It was very interesting applying concepts learned in the past such as dynamic programming and having it applied on images. Although some results turned out a little odd, overall, it was very satisfying to watch these images be morphed into comprehensive results that could at times trick the eye into thinking it is an untouched image.
Jump to Top