Histogram Equalization for Color & Grayscale Images (No TB)
Version 1.0.1.0 (7.62 KB) by
Patrik Forssén
Histogram Equalization for intensity, indexed and RGB images. Uses “flat histogram” equalization as default. No Toolbox is required.
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 LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.