You are here: Start » FIL.NET » FIL.EqualizeImageHistogram
Maps image pixels to new values to achieve uniform distribution of intensities in the range (0, 255).
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void EqualizeImageHistogram ( FilNet.Image inImage, NullableRef<FilNet.Region> inRoi, float inSaturateBrightestFraction, float inSaturateDarkestFraction, FilNet.Image outImage )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inImage | FilNet.Image | Input image. | ||
![]() | inRoi | FilNet.NullableRef<FilNet.Region> | Range of pixels to be processed. Default value: ftl::NIL. | ||
![]() | inSaturateBrightestFraction | float | <0.0f, 1.0f> | 0.0f | Fraction of the brightest pixels skipped during normalization. Default value: 0.0f. |
![]() | inSaturateDarkestFraction | float | <0.0f, 1.0f> | 0.0f | Fraction of the darkest pixels skipped during normalization. Default value: 0.0f. |
![]() | outImage | FilNet.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
![]() |
![]() |
EqualizeImageHistogram run on example image.
Errors
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. |