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.
18 Downloads
Updated 25 Jul 2022

View License

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 (2024). Histogram Equalization for Color & Grayscale Images (No TB) (https://www.mathworks.com/matlabcentral/fileexchange/115375-histogram-equalization-for-color-grayscale-images-no-tb), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Version Published Release Notes
1.0.1.0

Wrong file uploaded...

1.0.0