Operator Reference

get_contour_global_attrib_xldT_get_contour_global_attrib_xldGetContourGlobalAttribXldGetContourGlobalAttribXldget_contour_global_attrib_xld (Operator)

get_contour_global_attrib_xldT_get_contour_global_attrib_xldGetContourGlobalAttribXldGetContourGlobalAttribXldget_contour_global_attrib_xld — Return global attributes values of an XLD contour.

Signature

get_contour_global_attrib_xld(Contour : : Name : Attrib)

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

void GetContourGlobalAttribXld(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)

static void HOperatorSet.GetContourGlobalAttribXld(HObject contour, HTuple name, out HTuple attrib)

HTuple HXLDCont.GetContourGlobalAttribXld(HTuple name)

HTuple HXLDCont.GetContourGlobalAttribXld(string name)

def get_contour_global_attrib_xld(contour: HObject, name: MaybeSequence[str]) -> Sequence[float]

Description

get_contour_global_attrib_xldget_contour_global_attrib_xldGetContourGlobalAttribXldGetContourGlobalAttribXldget_contour_global_attrib_xld returns the values of the global attribute NameNameNamenamename of the XLD contour ContourContourContourcontourcontour in AttribAttribAttribattribattrib. Global attributes are additional values defined for each contour. query_contour_global_attribs_xldquery_contour_global_attribs_xldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXldquery_contour_global_attribs_xld 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""bright_dark""bright_dark""bright_dark"

The type of transition for each output XLD contour is stored in the attribute 'bright_dark'"bright_dark""bright_dark""bright_dark""bright_dark". It is set to 1.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.0.

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

connect_grid_pointsconnect_grid_pointsConnectGridPointsConnectGridPointsconnect_grid_points

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""bright_dark""bright_dark""bright_dark", is 1.0 for red contours and 0.0 for green contours.
'cont_approx'"cont_approx""cont_approx""cont_approx""cont_approx"

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

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

segment_contours_xldsegment_contours_xldSegmentContoursXldSegmentContoursXldsegment_contours_xld

'is_hole'"is_hole""is_hole""is_hole""is_hole"

For boundaries that enclose holes, the global contour attribute 'is_hole'"is_hole""is_hole""is_hole""is_hole" is set to 1.0, otherwise, it is set to 0.0.

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

symm_difference_closed_contours_xldsymm_difference_closed_contours_xldSymmDifferenceClosedContoursXldSymmDifferenceClosedContoursXldsymm_difference_closed_contours_xld, difference_closed_contours_xlddifference_closed_contours_xldDifferenceClosedContoursXldDifferenceClosedContoursXlddifference_closed_contours_xld, intersection_closed_contours_xldintersection_closed_contours_xldIntersectionClosedContoursXldIntersectionClosedContoursXldintersection_closed_contours_xld, union2_closed_contours_xldunion2_closed_contours_xldUnion2ClosedContoursXldUnion2ClosedContoursXldunion2_closed_contours_xld

Applying different set operations to XLD contours or contour sets adds the global attribute 'is_hole'"is_hole""is_hole""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_hole""is_hole""is_hole" is set to 1.0, otherwise the value of 'is_hole'"is_hole""is_hole""is_hole""is_hole" is 0.0 (orange contours).
'regr_dev_dist'"regr_dev_dist""regr_dev_dist""regr_dev_dist""regr_dev_dist"

'regr_dev_dist'"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""regr_dev_dist""regr_dev_dist""regr_dev_dist" is added by the following operator:

regress_contours_xldregress_contours_xldRegressContoursXldRegressContoursXldregress_contours_xld

'regr_dist'"regr_dist""regr_dist""regr_dist""regr_dist"

'regr_dist'"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""regr_dist""regr_dist""regr_dist" is added by the following operator:

regress_contours_xldregress_contours_xldRegressContoursXldRegressContoursXldregress_contours_xld

'regr_mean_dist'"regr_mean_dist""regr_mean_dist""regr_mean_dist""regr_mean_dist"

The attribute 'regr_mean_dist'"regr_mean_dist""regr_mean_dist""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""regr_mean_dist""regr_mean_dist""regr_mean_dist" is added by the following operator:

regress_contours_xldregress_contours_xldRegressContoursXldRegressContoursXldregress_contours_xld

'regr_norm_col'"regr_norm_col""regr_norm_col""regr_norm_col""regr_norm_col"

'regr_norm_col'"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""regr_norm_col""regr_norm_col""regr_norm_col" is added by the following operator:

regress_contours_xldregress_contours_xldRegressContoursXldRegressContoursXldregress_contours_xld

'regr_norm_row'"regr_norm_row""regr_norm_row""regr_norm_row""regr_norm_row"

'regr_norm_row'"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""regr_norm_row""regr_norm_row""regr_norm_row" is added by the following operator:

regress_contours_xldregress_contours_xldRegressContoursXldRegressContoursXldregress_contours_xld

Sketch of the attributes 'regr_dist'"regr_dist""regr_dist""regr_dist""regr_dist", 'regr_norm_col'"regr_norm_col""regr_norm_col""regr_norm_col""regr_norm_col", 'regr_norm_row'"regr_norm_row""regr_norm_row""regr_norm_row""regr_norm_row" for the regression of an XLD contour (red). 'regr_mean_dist'"regr_mean_dist""regr_mean_dist""regr_mean_dist""regr_mean_dist" and 'regr_dev_dist'"regr_dev_dist""regr_dev_dist""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

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

Parameters

ContourContourContourcontourcontour (input_object)  xld_cont objectHXLDContHObjectHObjectHobject

Input XLD contour.

NameNameNamenamename (input_control)  string(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Name of the attribute.

Default: 'regr_norm_row' "regr_norm_row" "regr_norm_row" "regr_norm_row" "regr_norm_row"

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

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

Attribute values.

Possible Predecessors

lines_gausslines_gaussLinesGaussLinesGausslines_gauss, lines_facetlines_facetLinesFacetLinesFacetlines_facet, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixedges_sub_pix, segment_contours_xldsegment_contours_xldSegmentContoursXldSegmentContoursXldsegment_contours_xld

Possible Successors

fit_circle_contour_xldfit_circle_contour_xldFitCircleContourXldFitCircleContourXldfit_circle_contour_xld, fit_ellipse_contour_xldfit_ellipse_contour_xldFitEllipseContourXldFitEllipseContourXldfit_ellipse_contour_xld, fit_line_contour_xldfit_line_contour_xldFitLineContourXldFitLineContourXldfit_line_contour_xld, fit_rectangle2_contour_xldfit_rectangle2_contour_xldFitRectangle2ContourXldFitRectangle2ContourXldfit_rectangle2_contour_xld

See also

query_contour_global_attribs_xldquery_contour_global_attribs_xldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXldquery_contour_global_attribs_xld, get_contour_attrib_xldget_contour_attrib_xldGetContourAttribXldGetContourAttribXldget_contour_attrib_xld, query_contour_attribs_xldquery_contour_attribs_xldQueryContourAttribsXldQueryContourAttribsXldquery_contour_attribs_xld

Module

Foundation