intensityintensityIntensityIntensityintensity (算子)

名称

intensityintensityIntensityIntensityintensity — 计算灰度值的均值和偏差。

签名

intensity(Regions, Image : : : Mean, Deviation)

Herror intensity(const Hobject Regions, const Hobject Image, double* Mean, double* Deviation)

Herror T_intensity(const Hobject Regions, const Hobject Image, Htuple* Mean, Htuple* Deviation)

void Intensity(const HObject& Regions, const HObject& Image, HTuple* Mean, HTuple* Deviation)

HTuple HImage::Intensity(const HRegion& Regions, HTuple* Deviation) const

double HImage::Intensity(const HRegion& Regions, double* Deviation) const

HTuple HRegion::Intensity(const HImage& Image, HTuple* Deviation) const

double HRegion::Intensity(const HImage& Image, double* Deviation) const

static void HOperatorSet.Intensity(HObject regions, HObject image, out HTuple mean, out HTuple deviation)

HTuple HImage.Intensity(HRegion regions, out HTuple deviation)

double HImage.Intensity(HRegion regions, out double deviation)

HTuple HRegion.Intensity(HImage image, out HTuple deviation)

double HRegion.Intensity(HImage image, out double deviation)

def intensity(regions: HObject, image: HObject) -> Tuple[Sequence[float], Sequence[float]]

def intensity_s(regions: HObject, image: HObject) -> Tuple[float, float]

描述

算子 intensityintensityIntensityIntensityIntensityintensity calculates the mean and the deviation of the gray values in the input image within RegionsRegionsRegionsRegionsregionsregions. If R is a region, p a pixel from R with the gray value g(p) and F the plane (F = |R|), the features are defined by:

注意

Note that the operator intensityintensityIntensityIntensityIntensityintensity only considers the given RegionsRegionsRegionsRegionsregionsregions and ignores any previously set domain of the input image ImageImageImageImageimageimage. The calculation of DeviationDeviationDeviationDeviationdeviationdeviation does not follow the usual definition if the region of the image contains only one pixel. In this case 0.0 is returned.

执行信息

参数

RegionsRegionsRegionsRegionsregionsregions (输入对象)  region(-array) objectHRegionHObjectHRegionHobject

Regions in which the features are calculated.

ImageImageImageImageimageimage (输入对象)  singlechannelimage objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)

灰度值图像。

MeanMeanMeanMeanmeanmean (输出控制)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Mean gray value of a region.

DeviationDeviationDeviationDeviationdeviationdeviation (输出控制)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Deviation of gray values within a region.

复杂度

若 F 为区域面积,则运行时间复杂度为 O(F)。

结果

算子 intensityintensityIntensityIntensityIntensityintensity 返回值 2 ( H_MSG_TRUE )。当输入为空(无可用输入图像)时可设置行为通过算子 set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>), the behavior in case of empty region is set via set_system(::'empty_region_result',<Result>:)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)set_system("empty_region_result",<Result>)。如有必要,则抛出异常。

可能的后继

thresholdthresholdThresholdThresholdThresholdthreshold

替代

select_grayselect_graySelectGraySelectGraySelectGrayselect_gray, min_max_graymin_max_grayMinMaxGrayMinMaxGrayMinMaxGraymin_max_gray

另见

mean_imagemean_imageMeanImageMeanImageMeanImagemean_image, gray_histogray_histoGrayHistoGrayHistoGrayHistogray_histo, gray_histo_absgray_histo_absGrayHistoAbsGrayHistoAbsGrayHistoAbsgray_histo_abs

模块

基础