Fake Miniatures

In this project, I wrote MATLAB code to allow for the generation of fake miniature images, artificially decreasing the depth of field by blurring regions of the image further from some artificial focus plane, represented by a line through the image. I then adjusted the saturation in each image by converting the image between color spaces from RGB to HSV and back.

Fake miniature images

Original image Tilt-shifted image

No saturation adjustment

Some artifacts from saturation adjustment

Bells and whistles

Arbitrary focus "plane" selection

The code as implemented allows two points to be selected in the image, which are then used as the focus "plane". Thus, blurring can occur along any arbitrary gradient in any direction. This is accomplished by using linspace to draw a line, and bwdist to generate a gradient, approximating depth.

Experiments with cross-bilateral filter

I attempted to use an implementation of the cross-bilateral filter, but ran into issues with the gradient I was generating-- I could not see any difference in the gradient I was using to generate masks for different levels of blurring, even after running the cross-bilateral with the image. The only artifact in the final image was band, where presumably increased blurring of the edges in the gradient caused overlapping image areas.

Gradient image (no discernible difference) Tilt-shifted image