get_contour_global_attrib_xldT_get_contour_global_attrib_xldGetContourGlobalAttribXldGetContourGlobalAttribXldget_contour_global_attrib_xld (Operator)

Name

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_xldGetContourGlobalAttribXldGetContourGlobalAttribXldGetContourGlobalAttribXldget_contour_global_attrib_xld returns the values of the global attribute NameNameNameNamenamename of the XLD contour ContourContourContourContourcontourcontour in AttribAttribAttribAttribattribattrib. Global attributes are additional values defined for each contour. query_contour_global_attribs_xldquery_contour_global_attribs_xldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXldquery_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""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""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""bright_dark" is added by the following operator:

connect_grid_pointsconnect_grid_pointsConnectGridPointsConnectGridPointsConnectGridPointsconnect_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""bright_dark", is 1.0 for red contours and 0.0 for green contours.
'cont_approx'"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""cont_approx": for 'cont_approx'"cont_approx""cont_approx""cont_approx""cont_approx""cont_approx"=-1, the contour is best approximated by a line segment, for 'cont_approx'"cont_approx""cont_approx""cont_approx""cont_approx""cont_approx"=0, by an elliptic arc, and for 'cont_approx'"cont_approx""cont_approx""cont_approx""cont_approx""cont_approx"=1, by a circular arc.

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

segment_contours_xldsegment_contours_xldSegmentContoursXldSegmentContoursXldSegmentContoursXldsegment_contours_xld

'is_hole'"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_hole" is set to 1, otherwise, it is set to 0.

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

symm_difference_closed_contours_xldsymm_difference_closed_contours_xldSymmDifferenceClosedContoursXldSymmDifferenceClosedContoursXldSymmDifferenceClosedContoursXldsymm_difference_closed_contours_xld, difference_closed_contours_xlddifference_closed_contours_xldDifferenceClosedContoursXldDifferenceClosedContoursXldDifferenceClosedContoursXlddifference_closed_contours_xld, intersection_closed_contours_xldintersection_closed_contours_xldIntersectionClosedContoursXldIntersectionClosedContoursXldIntersectionClosedContoursXldintersection_closed_contours_xld, union2_closed_contours_xldunion2_closed_contours_xldUnion2ClosedContoursXldUnion2ClosedContoursXldUnion2ClosedContoursXldunion2_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""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_hole" is set to 1.0, otherwise the value of 'is_hole'"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""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""regr_dev_dist" is added by the following operator:

regress_contours_xldregress_contours_xldRegressContoursXldRegressContoursXldRegressContoursXldregress_contours_xld

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

regress_contours_xldregress_contours_xldRegressContoursXldRegressContoursXldRegressContoursXldregress_contours_xld

'regr_mean_dist'"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""regr_mean_dist" [px] contains the mean of the Euclidian 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""regr_mean_dist" is added by the following operator:

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

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

regress_contours_xldregress_contours_xldRegressContoursXldRegressContoursXldRegressContoursXldregress_contours_xld

Sketch of the attributes 'regr_dist'"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_col", 'regr_norm_row'"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""regr_mean_dist" and 'regr_dev_dist'"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

Parameters

ContourContourContourContourcontourcontour (input_object)  xld_cont objectHXLDContHObjectHXLDContHobject

Input XLD contour.

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

Name of the attribute.

Default value: 'regr_norm_row' "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_row", 'regr_norm_col'"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_mean_dist", 'regr_dev_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""cont_approx", 'bright_dark'"bright_dark""bright_dark""bright_dark""bright_dark""bright_dark", 'is_hole'"is_hole""is_hole""is_hole""is_hole""is_hole"

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

Attribute values.

Possible Predecessors

lines_gausslines_gaussLinesGaussLinesGaussLinesGausslines_gauss, lines_facetlines_facetLinesFacetLinesFacetLinesFacetlines_facet, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPixedges_sub_pix, segment_contours_xldsegment_contours_xldSegmentContoursXldSegmentContoursXldSegmentContoursXldsegment_contours_xld

Possible Successors

fit_circle_contour_xldfit_circle_contour_xldFitCircleContourXldFitCircleContourXldFitCircleContourXldfit_circle_contour_xld, fit_ellipse_contour_xldfit_ellipse_contour_xldFitEllipseContourXldFitEllipseContourXldFitEllipseContourXldfit_ellipse_contour_xld, fit_line_contour_xldfit_line_contour_xldFitLineContourXldFitLineContourXldFitLineContourXldfit_line_contour_xld, fit_rectangle2_contour_xldfit_rectangle2_contour_xldFitRectangle2ContourXldFitRectangle2ContourXldFitRectangle2ContourXldfit_rectangle2_contour_xld

See also

query_contour_global_attribs_xldquery_contour_global_attribs_xldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXldquery_contour_global_attribs_xld, get_contour_attrib_xldget_contour_attrib_xldGetContourAttribXldGetContourAttribXldGetContourAttribXldget_contour_attrib_xld, query_contour_attribs_xldquery_contour_attribs_xldQueryContourAttribsXldQueryContourAttribsXldQueryContourAttribsXldquery_contour_attribs_xld

Module

Foundation