elliptic_axis_grayelliptic_axis_grayEllipticAxisGrayEllipticAxisGrayelliptic_axis_gray (算子)

名称

elliptic_axis_grayelliptic_axis_grayEllipticAxisGrayEllipticAxisGrayelliptic_axis_gray — 计算灰度图像中区域的方向和长轴。

签名

elliptic_axis_gray(Regions, Image : : : Ra, Rb, Phi)

Herror elliptic_axis_gray(const Hobject Regions, const Hobject Image, double* Ra, double* Rb, double* Phi)

Herror T_elliptic_axis_gray(const Hobject Regions, const Hobject Image, Htuple* Ra, Htuple* Rb, Htuple* Phi)

void EllipticAxisGray(const HObject& Regions, const HObject& Image, HTuple* Ra, HTuple* Rb, HTuple* Phi)

HTuple HImage::EllipticAxisGray(const HRegion& Regions, HTuple* Rb, HTuple* Phi) const

double HImage::EllipticAxisGray(const HRegion& Regions, double* Rb, double* Phi) const

HTuple HRegion::EllipticAxisGray(const HImage& Image, HTuple* Rb, HTuple* Phi) const

double HRegion::EllipticAxisGray(const HImage& Image, double* Rb, double* Phi) const

static void HOperatorSet.EllipticAxisGray(HObject regions, HObject image, out HTuple ra, out HTuple rb, out HTuple phi)

HTuple HImage.EllipticAxisGray(HRegion regions, out HTuple rb, out HTuple phi)

double HImage.EllipticAxisGray(HRegion regions, out double rb, out double phi)

HTuple HRegion.EllipticAxisGray(HImage image, out HTuple rb, out HTuple phi)

double HRegion.EllipticAxisGray(HImage image, out double rb, out double phi)

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

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

描述

算子 elliptic_axis_grayelliptic_axis_grayEllipticAxisGrayEllipticAxisGrayEllipticAxisGrayelliptic_axis_gray calculates the length of the axes RaRaRaRarara and RbRbRbRbrbrb and the orientation PhiPhiPhiPhiphiphi of the ellipse having the “same orientation” and the “aspect ratio” as the input region in RegionsRegionsRegionsRegionsregionsregions. Therefore, gray value moments which are derived from the ImageImageImageImageimageimage are used. Several input regions can be passed in RegionsRegionsRegionsRegionsregionsregions as tuples. The length of the major axis RaRaRaRarara and the minor axis RbRbRbRbrbrb as well as the orientation of the major axis with regard to the x-axis (PhiPhiPhiPhiphiphi) are determined. The angle is returned in radians. The calculation is done analogously to elliptic_axiselliptic_axisEllipticAxisEllipticAxisEllipticAxiselliptic_axis。The only difference is that in elliptic_axis_grayelliptic_axis_grayEllipticAxisGrayEllipticAxisGrayEllipticAxisGrayelliptic_axis_gray the gray value moments are used instead of the region moments. For the definition of the gray value moments, see area_center_grayarea_center_grayAreaCenterGrayAreaCenterGrayAreaCenterGrayarea_center_gray

Note, that in the case where the gray value area is zero the length of the axes RaRaRaRarara and RbRbRbRbrbrb as well as the orientation PhiPhiPhiPhiphiphi are also set to zero.

注意

Note that the operator elliptic_axis_grayelliptic_axis_grayEllipticAxisGrayEllipticAxisGrayEllipticAxisGrayelliptic_axis_gray only considers the given RegionsRegionsRegionsRegionsregionsregions and ignores any previously set domain of the input image ImageImageImageImageimageimage

执行信息

参数

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

待检查的区域。

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

灰度值图像。

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

Major axis of the region.

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

Minor axis of the region.

PhiPhiPhiPhiphiphi (输出控制)  angle.rad(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Angle enclosed by the major axis and the x-axis.

结果

elliptic_axis_grayelliptic_axis_grayEllipticAxisGrayEllipticAxisGrayEllipticAxisGrayelliptic_axis_gray 在所有参数正确且执行过程中未发生错误时返回 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>)。如有必要,则抛出异常。

可能的前趋

thresholdthresholdThresholdThresholdThresholdthreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionConnectionconnection

可能的后继

gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipsegen_ellipse

替代

elliptic_axiselliptic_axisEllipticAxisEllipticAxisEllipticAxiselliptic_axis

另见

area_center_grayarea_center_grayAreaCenterGrayAreaCenterGrayAreaCenterGrayarea_center_gray

模块

基础