Contrast Brightness Adjuster.
Great effect which was my favorite in previous project.
It's a paramless effect that adjusts contrast and brightness to maximize usage of available color space.
How it works:
1 get mean luminance of an image(mean of all pixels in gray-scaled version of image) - it's most used color(bit simplified assumption, but it's enough for first implementation)
2 calculate brightness to move most used color to center of color space, so brightness_function(most_used_pixel) = (127,127,127)
3 calculate contrast to fit lightest and darkest color as close as possible to white and black color.
We should also add a dependent routine that performs automatic white balance and then contrast-brightness-adjustment to get even more complex 'fix a photo' effect.