[][src]Function opencv::imgproc::equalize_hist

pub fn equalize_hist(
    src: &dyn ToInputArray,
    dst: &mut dyn ToOutputArray
) -> Result<()>

Equalizes the histogram of a grayscale image.

The function equalizes the histogram of the input image using the following algorithm:

  • Calculate the histogram inline formula for src .
  • Normalize the histogram so that the sum of histogram bins is 255.
  • Compute the integral of the histogram: block formula
  • Transform the image using inline formula as a look-up table: inline formula

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 .