pub fn equalize_hist(
src: &impl ToInputArray,
dst: &mut impl ToOutputArray,
) -> Result<()>
Expand description
Equalizes the histogram of a grayscale image.
The function equalizes the histogram of the input image using the following algorithm:
- Calculate the histogram
for src .
- Normalize the histogram so that the sum of histogram bins is 255.
- Compute the integral of the histogram:
- Transform the image using
as a look-up table:
The algorithm normalizes the brightness and increases the contrast of the image.
ยงParameters
- src: Source 8-bit single channel image.
- dst: Destination image of the same size and type as src .