Adaptive Contrast Enhancement


Adaptive Contrast Enhancement - FIXME one-liner goes here


The basic "Stretch Contrast" operation takes in the whole image at once, and if there is a white pixel anywhere in the image and a black pixel anywhere in the image, it figures the contrast is already as good as can be. But Adaptive Contrast Enhancement works to increase the contrast locally, and brings out details that most wide-sweeping contrast-enhancements pass over.




The "Strength" slider determines the extent of the contrast enhancing effect. If the full effect is too strong, it can be toned down.

Brightness adjust

Consider a strip of grey bordered by a darker color on the left. In order to enhance the contrast between the grey strip and it's darker neighbor, we will make the left edge of the strip brighter.

A problem arises, however, due to the fact that the image has fixed bounds on the extremes of light and dark. If our grey strip is a light grey, too near the image's upper limit for brightness, we cannot brighten the left edge enough to achieve the full effect.

(If you consider the same strip to also be bordered on the right by a lighter color, a similar arguement for darkening the right edge applies.)

Figure 1

The enhanced contrast of the border between strips on the right and left extremes of the image is not as pronounced as the border between strips in the center, even though the difference in brightness of a strip and its neighbor is the same.

To present a more accurate picture of contrasts, the program can perform a brightness adjustment, shifting the average image brightness towards middle-grey. By making our strip middle-grey, we are assured that we can either brighten or darken its edges as needed.

Figure 2

With brightness adjustment, all borders between strips are equally contrasting.

The result, that formerly bright and dark background areas of the image will now be the same brightness (as in Fig. 2), is not always desired, so the "brightness adjust" slider can be used to moderate the effect.

Figure 3

Note that the amount of adjustment necessary is dependant on the strength of the contrast enhancement. If the contrast enhancement is set such that the most it would brighten anything is by 10%, then the average brightness need only adjusted towards middle-grey by that much. It is not generally desireable for the program to meddle with the brightness more than that, and it will not do so by default.

Detail Size

This is the size of details in the image you wish to bring out. Smaller values will allow the process to adapt more closely to features of the image, but too small a value will concentrate too much on details and larger features of the image will be ignored. Try using the distance from the brightest point to the darkest in the feature you're intrested in.


The process used is an iterative one which passes over the image many times, each pass enhancing the contrast more. However, later passes will not have as much effect as earlier ones, and the changes between them will eventually be insignificant. This determines how many passes to use.


If your image has dust or static, the plug-in does a good job of emphasizing this noise. This option can help to smooth the noise away.

Color Method

The contrast enhancment process works by adjusting the brigtness of the pixels in your image. However, computer displays are not capable of showing all colours with equal brightness, their brightest blue appears much less bright than their brightest green. So what happens when the enhanced image calls for a colour brighter can be displayed?

There are currently two options:

add white
Make the pixel brighter by pushing its value towards white, reducing the saturation as a side-effect.
Limit the brightness to the maximum possible for the colour, possibly resulting in flat spots or colour plateaus.

This option is not relevant to grayscale images.


Re-calculate the preview image.
If this is checked, re-calculate the preview image whenever a parameter is changed.
Cancel an in-process preview calculation.


For those who used other versions of of Alex Stark's Adaptive Contrast Enhancement (the command-line pnmace or the Tcl/Tk based glace), here are some tips for adjusting to this version:

Bugs and TODO

Also see the files BUGS and TODO in the source distribution.

Please report other bugs or offers of assistance to the plug-ins discussion list.

PDB Declaration



See Also

Last modified: 2000/06/19 19:50:12
Kevin Turner