As any amateur photographer can tell you, extreme post-processing is always good. One such technique is called "miniature-faking".
The object is to make an image look like a photograph of a miniaturized, toy version of itself. This works best for photographs taken from a moderate/high angle to the ground, with a low variance in subject height, but can be applied with varying effectiveness to other images.
The challenge: Take a photograph and apply a miniature-faking algorithm to it. There are many ways to do this, but for the purposes of this challenge, it boils down to:
Some part of the image should be blurred to simulate a shallow depth-of-field. This is usually done along some gradient, whether linear or shaped. Choose whatever blur/gradient algorithm you like, but between 15-85% of the image must have "noticeable" blur.
Pump up the color to make things appear they were painted by hand. Output must have an average saturation level of > +5% when compared to input. (using HSV saturation)
Increase the contrast to simulate harsher lighting conditions (such as you see with an indoor/studio light rather than the sun). Output must have a contrast of > +5% when compared to input. (using RMS algorithm)
Those three alterations must be implemented, and no other enhancements/alterations are allowed. No cropping, sharpening, white balance adjustments, nothing.
Input is an image, and can be read from a file or memory. You may use external libraries to read and write the image, but you cannot use them to process the image. Supplied functions are also disallowed for this purpose (you can't just call
There is no other input. The processing strengths, levels, etc, must be determined by the program, not by a human.
Output can be displayed or saved as a file in a standardized image format (PNG, BMP, etc).
Try to generalize. It should not work on only one image, but it's understandable that it won't work on all images. Some scenes simply do not respond well to this technique, no matter how good the algorithm. Apply common sense here, both when answering and voting on answers.
Behavior is undefined for invalid inputs, and those images which are impossible to satisfy the spec. For example, a grayscale image cannot be saturated (there is no base hue), a pure white imaged cannot have increased contrast, etc.
Include at least two output images in your answer:
One must be generated from one of the images in this dropbox folder. There are six to choose from, but I tried to make them all viable to varying degrees. You can see sample outputs for each in the
example-outputssubfolder. Please note that these are full 10MP JPG images straight out of the camera, so you have a lot of pixels to work on.
The other can be any image of your choice. Obviously, try to choose images that are freely usable. Also, include either the original image or a link to it for comparison.
For example, from this image:
You might output something like:
For reference, the example above was processed in GIMP with an angular box-shaped gradient gaussian blur, saturation +80, contrast +20. (I don't know what units GIMP uses for those)
This is a popularity contest. Voters, vote for the entries you feel look the best while staying true to the objective.
Clarifying what functions are disallowed, it was not my intent to ban math functions. It was my intent to ban image manipulation functions. Yes, there's some overlap there, but things like FFT, convolutions, matrix math, etc, are useful in many other areas. You should not be using a function that simply takes an image and blurs. If you find a suitably mathy way to create a blur, that fair game.