If a pixel was black (or very near it) in the original image, and the output calls for a medium or high luminosity, what colour should the result be? Gray? Will this look odd if the surrounding pixels were dark purple? What if the original pixel was (RGB: 0, 0, 1), should the result be a fully-saturated blue? Again, this may look odd if the surrounding colours are a bit different, as the difference between the colours will become unnaturally exaggerated. This can be a problem, as the lower bits, especially for darker colours, are not always reliable in digital images.
The problem is illustrated below.
In this image from Wales (thanks Liam Quin), the stones will be brightened.
Here is the result our attempts to preserve saturation gleaned from the dark pixels [Strength & Brightness Adjust: 0.90, Terms: 40, Detail size: 30, Color method: "Add White"]:
The near-flourescent reds and oranges in the rocks probably aren't very representative of their original colours. The fact that the image was taken by a webcam and then saved as a lossy jpeg may have contributed to unreliable chromacity information. In any case, the next image, generated with Martin Weber's corrections for dark colours, has stones that look much more like stones.
For reference, you may want to check ACE's grayscale output of the scene.
This image (from Garrett LeSage of LinuxArt) is a clear canidate for Adaptive Contrast Enhancement. The patterns spanning shadow and sunlight are the sorts of things that would be hard to extract with any other tool.
Now, let's look at what happens with ACE and the colours. [Strength: 1.0, Brightness Adjust: 0.95, Iterations: 40, Detail Size: 28, Color Method: "Add White"]
Not only can we see the patterns made by the tire tracks in both the sunlight and the shadow now, but we've discovered a young branch with green pine-needles hiding in the shade in the lower-left.
Here's the image again, with the "dark colour correction" turned on this time.
We've lost almost all the colour here, and if that weren't a tragedy in itself, our branch of green pine needles are now almost impossible to pick out. So it seems that our original algorithm, which exaggerated the colours so unreasonably in our Wales image, was just what was needed here.
[Again, you may wish refer to the grayscale output for a luminosity reference.]
Questions, comments, reservations, and pointers to appropriate resources are strongly encouraged and appreciated. Please mail them to the address at the bottom of this page.
See also: