Histogram Equalization for Color & Grayscale Images (No TB)

Histogram Equalization for intensity, indexed and RGB images. Uses “flat histogram” equalization as default. No Toolbox is required.

You are now following this Submission

Histogram equalization for intensity, indexed and RGB images with no toolbox required. Default is a “flat histogram” equalization, but you may optionally use a standard algorithm. For color images the equalization is either based on the HSV (default) or the NTSC color model.
You may optionally exclude bins (intensity levels) from equalization and this can be used to reduce background and foreground noise. You can also supply a binary mask to exclude pixels from equalization.
Display of images and plotting of histograms and cumulative histograms is supported.
Detailed help is included in the file.
Examples,
heq('cloudCombined.jpg')
heq('ngc6543a.jpg')
settings.leftBucket = 25;
heq('ngc6543a.jpg', [], settings)

Cite As

Patrik Forssén (2026). Histogram Equalization for Color & Grayscale Images (No TB) (https://uk.mathworks.com/matlabcentral/fileexchange/115375-histogram-equalization-for-color-grayscale-images-no-tb), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.1.0

Wrong file uploaded...

1.0.0