area_center_grayarea_center_grayAreaCenterGrayAreaCenterGrayarea_center_gray (算子名称)

名称

area_center_grayarea_center_grayAreaCenterGrayAreaCenterGrayarea_center_gray — Compute the area and center of gravity of a region in a gray value image.

参数签名

area_center_gray(区域, Image : : : Area, Row, Column)

Herror area_center_gray(const Hobject 区域, const Hobject Image, double* Area, double* Row, double* Column)

Herror T_area_center_gray(const Hobject 区域, const Hobject Image, Htuple* Area, Htuple* Row, Htuple* Column)

void AreaCenterGray(const HObject& 区域, const HObject& Image, HTuple* Area, HTuple* Row, HTuple* Column)

HTuple HImage::AreaCenterGray(const HRegion& 区域, HTuple* Row, HTuple* Column) const

double HImage::AreaCenterGray(const HRegion& 区域, double* Row, double* Column) const

HTuple HRegion::AreaCenterGray(const HImage& Image, HTuple* Row, HTuple* Column) const

double HRegion::AreaCenterGray(const HImage& Image, double* Row, double* Column) const

static void HOperatorSet.AreaCenterGray(HObject 区域, HObject image, out HTuple area, out HTuple row, out HTuple column)

HTuple HImage.AreaCenterGray(HRegion 区域, out HTuple row, out HTuple column)

double HImage.AreaCenterGray(HRegion 区域, out double row, out double column)

HTuple HRegion.AreaCenterGray(HImage image, out HTuple row, out HTuple column)

double HRegion.AreaCenterGray(HImage image, out double row, out double column)

def area_center_gray(区域: HObject, image: HObject) -> Tuple[Sequence[float], Sequence[float], Sequence[float]]

def area_center_gray_s(区域: HObject, image: HObject) -> Tuple[float, float, float]

描述

area_center_grayarea_center_grayAreaCenterGrayAreaCenterGrayAreaCenterGrayarea_center_gray computes the area and center of gravity of the regions 区域区域区域区域区域区域 that have gray values which are defined by the image ImageImageImageImageimageimage. This operator is similar to area_centerarea_centerAreaCenterAreaCenterAreaCenterarea_center, but in contrast to that operator, the gray values of the image are taken into account while computing the area and center of gravity.

The area A of a region R in the image with the gray values g(r,c) is defined as This means that the area is defined by the volume of the gray value function g(r,c). The center of gravity is defined by the first two normalized moments of the gray values g(r,c), i.e., by , where

Note, that in the case where the AreaAreaAreaAreaareaarea is zero the row and column coordinates of the center of gravity are also set to zero.

注意

Note that 该算子 area_center_grayarea_center_grayAreaCenterGrayAreaCenterGrayAreaCenterGrayarea_center_gray only considers the given 区域区域区域区域区域区域 and ignores any previously set domain of the input image ImageImageImageImageimageimage. area_center_grayarea_center_grayAreaCenterGrayAreaCenterGrayAreaCenterGrayarea_center_gray can be executed on OpenCL devices if the device supports the cl_khr_fp64 and cl_khr_int64_base_atomics OpenCL extensions.

运行信息

参数表

区域区域区域区域区域区域 (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Region(s) to be examined.

ImageImageImageImageimageimage (input_object)  singlechannelimage objectHImageHObjectHImageHobject (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / real*) *allowed for compute devices

Gray value image.

AreaAreaAreaAreaareaarea (output_control)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Gray value volume of the region.

RowRowRowRowrowrow (output_control)  point.y(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Row coordinate of the gray value center of gravity.

ColumnColumnColumnColumncolumncolumn (output_control)  point.x(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Column coordinate of the gray value center of gravity.

结果

area_center_grayarea_center_grayAreaCenterGrayAreaCenterGrayAreaCenterGrayarea_center_gray returns 2 ( H_MSG_TRUE) if all parameters are correct and no error occurs during execution. If the input is empty the behavior can be set via 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>). If necessary, an exception is raised.

可能的前置算子

thresholdthresholdThresholdThresholdThresholdthreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionConnectionconnection

可替代算子

area_centerarea_centerAreaCenterAreaCenterAreaCenterarea_center

参考其它

area_center_xldarea_center_xldAreaCenterXldAreaCenterXldAreaCenterXldarea_center_xld, elliptic_axis_grayelliptic_axis_grayEllipticAxisGrayEllipticAxisGrayEllipticAxisGrayelliptic_axis_gray

模块

Foundation