You are here: Start » Filter Reference » Image » Image Enhancement » EqualizeImageHistogram
Module: | FoundationLite |
---|
Maps image pixels to new values to achieve uniform distribution of intensities in the range (0, 255).
Name | Type | Range | Description | |
---|---|---|---|---|
![]() |
inImage | Image | Input image | |
![]() |
inRoi | Region* | Range of pixels to be processed | |
![]() |
inSaturateBrightestFraction | Real | 0.0 - 1.0 | Fraction of the brightest pixels skipped during normalization |
![]() |
inSaturateDarkestFraction | Real | 0.0 - 1.0 | Fraction of the darkest pixels skipped during normalization |
![]() |
outImage | Image | Output image |
Requirements
For input inImage only pixel formats are supported: 1⨯uint8.
Read more about pixel formats in Image documentation.
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
![]() |
![]() |
EqualizeImageHistogram run on example image.
Errors
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Region exceeds an input image in EqualizeImageHistogram. |
DomainError | The sum of inSaturateBrightestFraction and inSaturateDarkestFraction can't be greater than 1 in EqualizeImageHistogram. |
DomainError | Not supported inImage pixel format in EqualizeImageHistogram. |
Complexity Level
This filter is available on Basic Complexity Level.
See Also
- ImageHistogram – Computes the histogram of the image pixel values.
- ConvertToCumulativeHistogram – Computes the cumulative histogram of input histogram.