mean_n ( Image : ImageMean : NumberOfChannels : )

Average gray values over several channels.

The operator mean_n generates the pixel-by-pixel mean value of all channels . For each coordinate point the sum of all gray values at this coordinate is calculated. The result is the mean of the gray values (sum divided by the number of channels). The output image has one channel.


Parameters

Image (input_object)
multichannel-image(-array) -> object : byte
Multichannel gray image.

ImageMean (output_object)
singlechannelimage(-array) -> object : byte
Result of averaging.

NumberOfChannels (input_control)
integer -> integer
Number of channels.
Default value: 3
Suggested values: 2, 3, 4, 5, 6, 7
Range of values: 1 <= NumberOfChannels


Example
compose3(Channel1,Channel2,Channel3,&MultiChannel);
mean_n(MultiChannel,&Mean,3);

Possible Predecessors

compose2, compose3, compose4


Possible Successors

disp_image



Copyright © 1996-1997 MVTec Software GmbH