HISTOGRAM OF AN IMAGE
Intensity transformation functions extracted from image intensity histograms play a
basic role in image processing in areas such as enhancement, compression, segmentation, and
description.
The histogram of a digital image with L total possible intensity levels in the range [0,G]
is defined as the discrete function,
h(rk)= nk
rk is the kth intensity level in the interval [0,G].
Value of G is 255 for class uint8.
Often it is useful to work with normalized histograms as
p(rk)= h(rk)/n
= nk/n
Where n is total no. of pixels in the image.
The core function in the toolbox for dealing with image histogram is
h= imhist (f,b),
where f is input image, b is no. of bins. Default value of b is 256.
Normalized histogram is,
p= imhist (f,b)/numel(f)
Cite As
antonynycil (2024). HISTOGRAM OF AN IMAGE (https://www.mathworks.com/matlabcentral/fileexchange/37795-histogram-of-an-image), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > Images >
- MATLAB > Graphics > 2-D and 3-D Plots > Data Distribution Plots > Histograms >
Tags
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.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |