Implements local equalization of the histogram. Can be used to enhance local contrast and visibility of structures in the image. [more]

Categories: IntensityTransformations

Keywords: histogram, equalization, local contrast



This process implements local histogram equalization with configurable limitation of maximal contrast enhancement. It is based on the CLAHE method (Contrast-Limited Adaptive Histogram Equalization). The main purpose of the process is to enhance local contrast and visibility of structures in low-contrast regions of the image. The process is designed to run on non-linear (already stretched) image.

Histogram equalization takes histogram and computes a transfer curve, which grants more brightness range to higher histogram peaks and less brightness range to histogram valleys. In other words, large areas of similar brightness get more contrast. Local histogram equalization works on individual pixels and computes transfer curve from the histogram of pixel neighborhood.

Classical histogram equalization has drawback of giving most contrast range to high narrow peaks - like uniform noisy background. This problem is solved with Contrast Limit property of the CLAHE method. This parameter limits maximal slope of the transfer curve and prevents narrow peaks from getting too much contrast (effectively reducing noise promotion).


Kernel Radius

Radius of the area around the pixel used to evaluate histogram. Lower values strenghten the effect but are sensitive to noise and suffer from ringing around bright features like stars. Higher values weaken the effect but are more stable and do not exhibit ringing. For most images, values from 32 to 128 are suitable.

Contrast Limit

Maximal allowed slope of the transfer curve applied to individual pixels. Value of 1.0 mean no change at all. High values make the method very similar to classical histogram equalization and tend to promote noise. Suggested values are from 1.5 to 3.


Allows you to control the amount of delivered change by blending the result with the original image. The value of 0.75 means that the resulting image will be a blend of 1/4 of the original and 3/4 of the processed image.

Histogram Resolution

The resolution of the histogram used to evaluate the equalization transfer curve. Higher values makes computation more precise but slower. Besides, they can work poorly with low Kernel Radius. For most images use 8-bit resolution. In case you're using high Kernel Radius and you encounter posterized results, try higher resolutions.

Circular Kernel

If switched on, histogram is evaluated from circular area around pixel. This is recommended to make the effect uniform. If switched off, histogram is evaluated in square area.


Usually, this process is used in final stages of your image processing when the image is already stretched. In case there are regions with low contrast structures (like nebula or galaxy), you can use this process to increase contrast in these areas.

Test on previews. In order to provide a good preview of the final result, the preview size should be larger than kernel diameter (2x Kernel Radius parameter). You may want to protect stars or background with mask. The process works best in regions with moderate brightness.

Experiment with two basic parameters - Kernel Radius and Contrast Limit. In general, decreasing radius or increasing limit makes the effect stronger but also more noisy. When you are satisfied, you can fine-tune the amount of the delivered change by using the Amount parameter.

It is recommended to keep the last two parameters (Histogram Resolution and Circular Kernel) on their default values unless you have good reasons to change them.