The Adaptive Histogram EQ .8bf Plugin
Version 1.112, updated 12/12/2015


Histogram equalization attempts to evenly distribute values across an image’s histogram.  Unlike a simple levels adjustment, equalization tends to increase contrast in low-contrast areas, while doing the opposite in high-contrast areas.  Adaptive equalization samples the pixels in separate regions of the image and applies equalization locally.

Equalization does not work with every image.  A classic subject is a detailed sky with a balance of light and dark areas.  Images with broad expanses of light or dark tend not to be good candidates.  Especially in featureless areas, equalization may amplify the tiniest amount of noise, grain, or jpeg artifact.  16-bit tifs work best.  Note that the preview may be of lower quality than the processed image.

• The long dimension of the image is divided into the number of sections specified by the Regions control, and the rest of the image sectioned off accordingly.  Each region is processed individually; more regions require more processing time.  The choice of number of regions is completely subjective based on the amount and quality of detail in the image.
• The Amount setting controls the intensity of the effect.  For dramatic contrast enhancement, try a high amount and a low number of regions.  For fine detail enhancement, try the opposite.

• In Normal mode, the plugin processes each RGB channel separately.  The processed colors often have an unreal appearance but may still be interesting.  Color controls how much of the processed color components are included in the final image.  In Grayscale Only mode, the plugin processes a grayscale copy of the image, then combines it with the color components of the original image.  This is similar, but not identical, to Normal mode with Color set to zero; sometimes the results of the latter are superior.  However, the former runs faster.  In Color Only mode, only the processed color components are used in the final image.
• Vibrance preferentially increases the saturation of less-saturated areas of the image.
• Limit can prevent extreme contrast increases that turn featureless areas into a mass of noise, possibly at the expense of other desirable enhancement.  It is actually disabled at its highest setting.

• Dark/Light Mixer works as follows:  the central position (zero) displays the processed image; the far left is like Darken blend mode, and the far right is like Lighten.
• Use the masks to protect blown shadows and highlights.  Try starting with Tonal Width and Radius 0 and Amount 100.  Raise the Tonal Width and Radius to create an appropriate mask, then reduce Amount to 0 and gradually raise it again to achieve the desired effect.  Amounts greater than 100 only affect blurred areas of the mask.
• The white histogram (background) is the original image; the black one (foreground) is the processed image.

The plugin works with 8- or 16-bit RGB and grayscale images.

See Histogram equalization at Wikipedia for more information.

img img
A good example of sky enhancement.
img img
Alan Ross, Santa Fe.  The effect was masked a little from the face and the dark background.  Note the enhancement of textures throughout.
img img
More texture enhancement.  Note how the shadows were raised while the background was simultaneously lowered.  (In other words, the histogram was equalized.)
img img
The noise that arises from enhancing relatively featureless areas.
img img
An image for which the Color slider works.


Download the zipped file, then copy AdaptiveHistogramEQ.8bf into your plugins folder.  It will appear under “RC Filters.” version 1.112, 292 KB, 64-bit applications.  It works for me in Photoshop CS5 and PhotoLine 20, Windows 7. version 1.112, 287 KB, 32-bit applications, Windows 32 or 64 bit.  It works for me in IrfanView 4, Windows 7. |  source code

A one-time payment of $5.00 is requested; thank you.

Or click through an Amazon link and go shopping.

© 2015 by Russell Cottrell; released under the GNU General Public License.
Updated 12/12/2015.