Image histogram
- It is mainly used to describe the frequency distribution of pixel brightness or color in an image.
- It is a statistical graph where the horizontal axis represents the range of pixel values (gray levels or color intensities), and the vertical axis represents the number of pixels that have each value.
- Histograms don’t encode information about the spatial arrangement of pixels in the image

- Binning: Grouping continuous or high-resolution values into discrete intervals (bins) for statistical counting without changing the original data.
- Quantization: Mapping continuous or high-precision values to a smaller set of discrete levels, altering the data itself.
Properties
- Contrast: the range of intensity values effectively used within an image
- Dynamic Range: the range (or number) of distinct intensity values that can be represented in an image or system.
Image Defects
- Saturation: the illumination values lying outside of the sensor’s range are mapped to its maximum or minimum values: spike at the tails
- Intensity saturation: pixels concentrated near 0 or 255
- Exposure
- Under-exposure: Most pixel intensities cluster near 0, making the image too dark with loss of shadow detail.
- Over-exposure: Most pixel intensities cluster near 255, making the image too bright with loss of highlight detail.
Color Image Histogram
Two kinds of histogram:
- Intensity histogram
- Individual Color Channel Histograms
Cumulative Histograms
- K: The total number of possible gray levels in the image (for an 8-bit image, K = 256)
- M × N: The total number of pixels in the image