You are here: Start » FIL.NET » FIL.ImageAverage
Computes the average of the image pixel values.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
public static void ImageAverage ( FilNet.Image inImage, out FilNet.Pixel outAverageColor, NullableValue<float> outAverageValue )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inImage | FilNet.Image | Input image. | ||
![]() | outAverageColor | FilNet.Pixel | Average of each channel. | ||
![]() | outAverageValue | FilNet.NullableValue<float> | Average of the entire image. Can be null to skip this parameter calculation. |
Description
The function calculates average of pixel values in the inImage.
Average values of pixels calculated for each channel are returned in outAverageColor, while calculated for the region of interest - in outAverageValue. If region of interest isn't specified, average is calculated for the entire image.
Examples
![]() In this single-channel image, average will be 127.5 for the channel and for the entire image (if the region of interested isn't specified). |
![]() In this three-channel RGB image, average will be 0 for R and G channels and 255 for the B channel. If we don't specify the region of interest, average of the image will be 85.0 (because arithmetic mean of 0, 0, and 255 is 85.0). |
|
![]() In this three-channel RGB image, average will be 63.75 for R and B channels and 127.5 for the G channel. If we don't specify the region of interest, average of the image will be 85.0 (because arithmetic mean of 63.75, 63.75 and 127.5 is 85.0). |
Remarks
Minimal image size requirement
The input image shouldn't be empty.
Minimal region of interest size requirement
The input region of interest shouldn't be empty.
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.
Hardware acceleration settings may be manipulated with Settings class.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty image on input in ImageAverage. |
DomainError | Empty region of interest on input in ImageAverage. |
DomainError | Region exceeds an input image in ImageAverage. |
Function Overrides
- ImageAverage(Image, Pixel)
- ImageAverage(Image, NullableRef<Region>, Pixel)
- ImageAverage(Image, NullableRef<Region>, Pixel, Single)
- ImageAverage(Image, NullableRef<Region>, Pixel, NullableValue<Single>)