Skip to content

elliptic_axis_grayEllipticAxisGrayEllipticAxisGrayelliptic_axis_grayelliptic_axis_grayπŸ”—

Short descriptionπŸ”—

elliptic_axis_grayEllipticAxisGrayEllipticAxisGrayelliptic_axis_grayelliptic_axis_gray β€” Compute the orientation and major axes of a region in a gray value image.

SignatureπŸ”—

elliptic_axis_gray( region Regions, image Image, out real Ra, out real Rb, out angle.rad Phi )void EllipticAxisGray( const HObject& Regions, const HObject& Image, HTuple* Ra, HTuple* Rb, HTuple* Phi )static void HOperatorSet.EllipticAxisGray( HObject regions, HObject image, out HTuple ra, out HTuple rb, out HTuple 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]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 )

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

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 )

DescriptionπŸ”—

The operator elliptic_axis_grayEllipticAxisGray calculates the length of the axes Rarara and Rbrbrb and the orientation Phiphiphi of the ellipse having the β€œsame orientation” and the β€œaspect ratio” as the input region in Regionsregionsregions. Therefore, gray value moments which are derived from the Imageimageimage are used. Several input regions can be passed in Regionsregionsregions as tuples. The length of the major axis Rarara and the minor axis Rbrbrb as well as the orientation of the major axis with regard to the x-axis (Phiphiphi) are determined. The angle is returned in radians. The calculation is done analogously to elliptic_axisEllipticAxis. The only difference is that in elliptic_axis_grayEllipticAxisGray the gray value moments are used instead of the region moments. For the definition of the gray value moments, see area_center_grayAreaCenterGray.

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

AttentionπŸ”—

Note that the operator elliptic_axis_grayEllipticAxisGray only considers the given Regionsregionsregions and ignores any previously set domain of the input image Imageimageimage.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

ParametersπŸ”—

Regionsregionsregions (input_object) region(-array) β†’ objectHObjectHRegionHObjectHobject

Region(s) to be examined.

Imageimageimage (input_object) singlechannelimage β†’ object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)Hobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)

Gray value image.

Rarara (output_control) real(-array) β†’ (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Major axis of the region.

Rbrbrb (output_control) real(-array) β†’ (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Minor axis of the region.

Phiphiphi (output_control) angle.rad(-array) β†’ (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

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

ResultπŸ”—

elliptic_axis_grayEllipticAxisGray 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>:). If necessary, an exception is raised.

Combinations with other operatorsπŸ”—

Combinations

Possible predecessors

thresholdThreshold, regiongrowingRegiongrowing, connectionConnection

Possible successors

gen_ellipseGenEllipse

Alternatives

elliptic_axisEllipticAxis

See also

area_center_grayAreaCenterGray

ModuleπŸ”—

Foundation