mean_nmean_nMeanNMeanNmean_n (算子)

名称

mean_nmean_nMeanNMeanNmean_n — 多个通道的平均灰度值。

签名

mean_n(Image : ImageMean : : )

Herror mean_n(const Hobject Image, Hobject* ImageMean)

Herror T_mean_n(const Hobject Image, Hobject* ImageMean)

void MeanN(const HObject& Image, HObject* ImageMean)

HImage HImage::MeanN() const

static void HOperatorSet.MeanN(HObject image, out HObject imageMean)

HImage HImage.MeanN()

def mean_n(image: HObject) -> HObject

描述

算子 mean_nmean_nMeanNMeanNMeanNmean_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.

有关平滑滤波器概念的说明,请参阅 滤波器 / 平滑 一章的引言。

注意

请注意,若使用域缩减后的图像作为输入,滤波器算子可能会返回意外结果。请参阅 滤波器 一章

执行信息

参数

ImageImageImageImageimageimage (输入对象)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte / int2 / uint2 / int4 / real)

Multichannel gray image.

ImageMeanImageMeanImageMeanImageMeanimageMeanimage_mean (输出对象)  singlechannelimage(-array) objectHImageHObjectHImageHobject * (byte / int2 / uint2 / int4 / real)

Result of averaging.

示例(C)

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

可能的前趋

compose2compose2Compose2Compose2Compose2compose2, compose3compose3Compose3Compose3Compose3compose3, compose4compose4Compose4Compose4Compose4compose4, compose5compose5Compose5Compose5Compose5compose5, add_channelsadd_channelsAddChannelsAddChannelsAddChannelsadd_channels

替代

rank_nrank_nRankNRankNRankNrank_n

另见

count_channelscount_channelsCountChannelsCountChannelsCountChannelscount_channels, mean_imagemean_imageMeanImageMeanImageMeanImagemean_image

模块

基础