Skip to content

get_contour_global_attrib_xldget_contour_global_attrib_xldGetContourGlobalAttribXldGetContourGlobalAttribXldget_contour_global_attrib_xldT_get_contour_global_attrib_xld🔗

Short description🔗

get_contour_global_attrib_xldget_contour_global_attrib_xldGetContourGlobalAttribXldGetContourGlobalAttribXldget_contour_global_attrib_xldT_get_contour_global_attrib_xld — Return global attributes values of an XLD contour.

Signature🔗

get_contour_global_attrib_xld( xld_cont Contour, string Name, out real Attrib )get_contour_global_attrib_xld( Contour : : Name : Attrib )void GetContourGlobalAttribXld( const HObject& Contour, const HTuple& Name, HTuple* Attrib )static void HOperatorSet.GetContourGlobalAttribXld( HObject contour, HTuple name, out HTuple attrib )def get_contour_global_attrib_xld( contour: HObject, name: MaybeSequence[str] ) -> Sequence[float]

Herror T_get_contour_global_attrib_xld( const Hobject Contour, const Htuple Name, Htuple* Attrib )

HTuple HXLDCont::GetContourGlobalAttribXld( const HTuple& Name ) const

HTuple HXLDCont::GetContourGlobalAttribXld( const HString& Name ) const

HTuple HXLDCont::GetContourGlobalAttribXld( const char* Name ) const

HTuple HXLDCont::GetContourGlobalAttribXld( const wchar_t* Name ) const (Windows only)

HTuple HXLDCont.GetContourGlobalAttribXld( HTuple name )

HTuple HXLDCont.GetContourGlobalAttribXld( string name )

Description🔗

get_contour_global_attrib_xldGetContourGlobalAttribXld returns the values of the global attribute Namenamename of the XLD contour Contourcontourcontour in Attribattribattrib. Global attributes are additional values defined for each contour. query_contour_global_attribs_xldQueryContourGlobalAttribsXld can be used to query which global attributes are set for a particular contour.

The following list contains information about the different global contour attributes and the operators that add them to XLD contours:

  • 'bright_dark'"bright_dark" The type of transition for each output XLD contour is stored in the attribute 'bright_dark'"bright_dark". It is set to 1.01.0, if the connecting line forms a bright-dark transition (left to right, viewed from start point to end point), otherwise it is set to 0.00.0.

    The attribute 'bright_dark'"bright_dark" is added by the following operator:

    connect_grid_pointsConnectGridPoints

    Exemplary XLD contours (red and green) along the edges of a rectification grid (direction from start to end point indicated by arrow head). The transition type, stored in the attribute 'bright_dark'"bright_dark", is 1.01.0 for red contours and 0.00.0 for green contours.

  • 'cont_approx'"cont_approx" The best way to approximate a contour is stated by the attribute 'cont_approx'"cont_approx": for 'cont_approx'"cont_approx"=-1.0-1.0, the contour is best approximated by a line segment, for 'cont_approx'"cont_approx"=0.00.0, by an elliptic arc, and for 'cont_approx'"cont_approx"=1.01.0, by a circular arc.

    The attribute 'cont_approx'"cont_approx" is added by the following operator:

    segment_contours_xldSegmentContoursXld

  • 'is_hole'"is_hole" For boundaries that enclose holes, the global contour attribute 'is_hole'"is_hole" is set to 1.01.0, otherwise, it is set to 0.00.0.

    The attribute 'is_hole'"is_hole" is added by the following operators:

    symm_difference_closed_contours_xldSymmDifferenceClosedContoursXld, difference_closed_contours_xldDifferenceClosedContoursXld, intersection_closed_contours_xldIntersectionClosedContoursXld, union2_closed_contours_xldUnion2ClosedContoursXld

    Applying different set operations to XLD contours or contour sets adds the global attribute 'is_hole'"is_hole" to the resulting contour(s). In the example above, for two sets (red and green) of closed contours different set operations are performed. If a resulting boundary encloses a hole (blue contours), 'is_hole'"is_hole" is set to 1.01.0, otherwise the value of 'is_hole'"is_hole" is 0.00.0 (orange contours).

  • 'regr_dev_dist'"regr_dev_dist" 'regr_dev_dist'"regr_dev_dist" [px] gives the standard deviation of the (Euclidean) distances between the contour points and the regression line (see image below).

    The attribute 'regr_dev_dist'"regr_dev_dist" is added by the following operator:

    regress_contours_xldRegressContoursXld

  • 'regr_dist'"regr_dist" 'regr_dist'"regr_dist" [px] gives the minimal distance of the regression line from the origin of the image coordinate system (see image below).

    The attribute 'regr_dist'"regr_dist" is added by the following operator:

    regress_contours_xldRegressContoursXld

  • 'regr_mean_dist'"regr_mean_dist" The attribute 'regr_mean_dist'"regr_mean_dist" [px] contains the mean of the Euclidean distances between each contour point and the regression line (see image below).

    The attribute 'regr_mean_dist'"regr_mean_dist" is added by the following operator:

    regress_contours_xldRegressContoursXld

  • 'regr_norm_col'"regr_norm_col" 'regr_norm_col'"regr_norm_col" [px] is the column coordinate of the unit normal vector of the regression line with the normal vector pointing from the origin to the line (see image below).

    The attribute 'regr_norm_col'"regr_norm_col" is added by the following operator:

    regress_contours_xldRegressContoursXld

  • 'regr_norm_row'"regr_norm_row" 'regr_norm_row'"regr_norm_row" [px] is the row coordinate of the unit normal vector of the regression line with the normal vector pointing from the origin to the line (see image below).

    The attribute 'regr_norm_row'"regr_norm_row" is added by the following operator:

    regress_contours_xldRegressContoursXld

    Sketch of the attributes 'regr_dist'"regr_dist", 'regr_norm_col'"regr_norm_col", 'regr_norm_row'"regr_norm_row" for the regression of an XLD contour (red). 'regr_mean_dist'"regr_mean_dist" and 'regr_dev_dist'"regr_dev_dist" are computed from the distances (black arrows) between the contour points and the regression line (solid black line).

Execution information🔗

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

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

  • Processed without parallelization.

Parameters🔗

Contourcontourcontour (input_object) xld_cont → objectobjectHObjectHXLDContHObjectHobject

Input XLD contour.

Namenamename (input_control) string(-array) → (string)(string)HTuple (HString)HTuple (string)MaybeSequence[str]Htuple (char*)

Name of the attribute.

Default: 'regr_norm_row'"regr_norm_row"
Suggested values: 'regr_norm_row', 'regr_norm_col', 'regr_mean_dist', 'regr_dev_dist', 'cont_approx', 'bright_dark', 'is_hole'"regr_norm_row", "regr_norm_col", "regr_mean_dist", "regr_dev_dist", "cont_approx", "bright_dark", "is_hole"

Attribattribattrib (output_control) real-array → (real)(real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Attribute values.

Combinations with other operators🔗

Combinations

Possible predecessors

lines_gaussLinesGauss, lines_facetLinesFacet, edges_sub_pixEdgesSubPix, segment_contours_xldSegmentContoursXld

Possible successors

fit_circle_contour_xldFitCircleContourXld, fit_ellipse_contour_xldFitEllipseContourXld, fit_line_contour_xldFitLineContourXld, fit_rectangle2_contour_xldFitRectangle2ContourXld

See also

query_contour_global_attribs_xldQueryContourGlobalAttribsXld, get_contour_attrib_xldGetContourAttribXld, query_contour_attribs_xldQueryContourAttribsXld

Module🔗

Foundation