Start » Filter Reference » Image » Image Conversions » AverageChannels_Weighted
Module: | FoundationLite |
---|
Creates a monochromatic image from weighted averages of the input image channels.
Name | Type | Description | |
---|---|---|---|
inImage | Image | Input image | |
inRoi | Region* | Range of pixels to be processed | |
inWeight1 | Integer | Weight of the first channel | |
inWeight2 | Integer | Weight of the second channel | |
inWeight3 | Integer | Weight of the third channel | |
inWeight4 | Integer | Weight of the fourth channel | |
outImage | Image | Output image |
Description
The operation computes the monochromatic average of the inImage color channels. Average being computed at each pixel is a weighted arithmetic mean.
Weights of the channels are determined by the parameters inWeight1, inWeight2, inWeight3, inWeight4. For images having less than four channels, it is required that weights assigned to non-existing channels equal zero.
Examples
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.
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 | Non-zero weight of not existing image channel in AverageChannels_Weighted. |
DomainError | Region exceeds an input image in AverageChannels_Weighted. |
DomainError | Sum of weights equals zero in AverageChannels_Weighted. |
Complexity Level
This filter is available on Advanced Complexity Level.
Filter Group
This filter is member of AverageChannels filter group.
See Also
- AverageChannels – Creates a monochromatic image by averaging the input image channels.
- MixChannels – Calculates a linear combination of image channels.