Back to Adaptive Vision Library website
You are here: Start » Function Reference » Image Enhancement » EqualizeImageHistogram
EqualizeImageHistogram
Maps image pixels to new values to achieve uniform distribution of intensities in the range (0, 255).
Syntax
C++
C#
void avl::EqualizeImageHistogram ( const avl::Image& inImage, atl::Optional<const avl::Region&> inRoi, avl::Image& outImage )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
inImage | const Image& | Input image | ||
inRoi | Optional<const Region&> | NIL | Range of pixels to be processed | |
outImage | Image& | Output image |
Description
The filter applies non-linear mapping to image pixel values so that pixel intensities of the resulting image are evenly distributed in range from 0 to 255.
The operation computes the cumulative histogram \(C\) of inImage and the image size \(N\). Then the result is computed as follows:
\[ \begin{aligned} outImage[i,j] &= C[ inImage[i,j] ] \times \frac{255}{N} \end{aligned} \]Examples
In-place Processing
This function supports in-place data processing - you can pass the same reference to inImage and outImage