get_contour_attrib_xldT_get_contour_attrib_xldGetContourAttribXldGetContourAttribXldget_contour_attrib_xld (Operator)

Name

get_contour_attrib_xldT_get_contour_attrib_xldGetContourAttribXldGetContourAttribXldget_contour_attrib_xld — Return point attribute values of an XLD contour.

Signature

get_contour_attrib_xld(Contour : : Name : Attrib)

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

void GetContourAttribXld(const HObject& Contour, const HTuple& Name, HTuple* Attrib)

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

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

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

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

HTuple HXLDCont.GetContourAttribXld(string name)

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

Description

get_contour_attrib_xldget_contour_attrib_xldGetContourAttribXldGetContourAttribXldGetContourAttribXldget_contour_attrib_xld returns the values of the attribute NameNameNameNamenamename of the XLD contour ContourContourContourContourcontourcontour in AttribAttribAttribAttribattribattrib. Contour point attributes are additional values defined for each contour point and describe local features. query_contour_attribs_xldquery_contour_attribs_xldQueryContourAttribsXldQueryContourAttribsXldQueryContourAttribsXldquery_contour_attribs_xld can be used to query which attributes are set for a particular contour.

The following list contains information about the different contour point attributes and the operators that add them to XLD contours (for exceptions see the respective operator references):

'angle'"angle""angle""angle""angle""angle"

The direction of the normal vectors of the contour is described by 'angle'"angle""angle""angle""angle""angle" [rad] (see image below). It is oriented such that the normal vectors point to the right side of the contour as the contour is traversed from start to end point (the angles are defined counterclockwise with respect to the row axis of the image).

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

edges_color_sub_pixedges_color_sub_pixEdgesColorSubPixEdgesColorSubPixEdgesColorSubPixedges_color_sub_pix, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPixedges_sub_pix, lines_colorlines_colorLinesColorLinesColorLinesColorlines_color, lines_facetlines_facetLinesFacetLinesFacetLinesFacetlines_facet, lines_gausslines_gaussLinesGaussLinesGaussLinesGausslines_gauss

'response'"response""response""response""response""response"

'response'"response""response""response""response""response" contains the magnitude of the edge gradient (see image below).

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

edges_color_sub_pixedges_color_sub_pixEdgesColorSubPixEdgesColorSubPixEdgesColorSubPixedges_color_sub_pix, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPixedges_sub_pix, lines_colorlines_colorLinesColorLinesColorLinesColorlines_color, lines_facetlines_facetLinesFacetLinesFacetLinesFacetlines_facet, lines_gausslines_gaussLinesGaussLinesGaussLinesGausslines_gauss

'width_right'"width_right""width_right""width_right""width_right""width_right"

The line width to the right of the line (as the contour is traversed from start to end point) is described by 'width_right'"width_right""width_right""width_right""width_right""width_right" [px] (see image below).

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

lines_colorlines_colorLinesColorLinesColorLinesColorlines_color, lines_gausslines_gaussLinesGaussLinesGaussLinesGausslines_gauss

'width_left'"width_left""width_left""width_left""width_left""width_left"

The line width to the left of the line (as the contour is traversed from start to end point) is described by 'width_left'"width_left""width_left""width_left""width_left""width_left" [px] (see image below).

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

lines_colorlines_colorLinesColorLinesColorLinesColorlines_color, lines_gausslines_gaussLinesGaussLinesGaussLinesGausslines_gauss

(1) (2) (3)
Visualization of different point attributes of a contour (red). The starting point of the contour is marked with a white cross. (1) Vectors (yellow), plotted at 'angle'"angle""angle""angle""angle""angle" (with respect to the row axis), representing the normal for every point of the contour, (2) behavior of the attribute 'response'"response""response""response""response""response" along a contour, and (3) visualization of the calculated attributes 'width_right'"width_right""width_right""width_right""width_right""width_right" (yellow) and 'width_left'"width_left""width_left""width_left""width_left""width_left" (green).
'edge_direction'"edge_direction""edge_direction""edge_direction""edge_direction""edge_direction"

Gives the direction of the edge (not of the XLD contour), calculated from image gradients in direction of rows and columns. The angles are given with respect to the column axis of the image.

The attribute 'edge_direction'"edge_direction""edge_direction""edge_direction""edge_direction""edge_direction" [rad] is added by the following operators:

edges_color_sub_pixedges_color_sub_pixEdgesColorSubPixEdgesColorSubPixEdgesColorSubPixedges_color_sub_pix, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPixedges_sub_pix

Vectors plotted in 'edge_direction'"edge_direction""edge_direction""edge_direction""edge_direction""edge_direction" (yellow) for every point of a contour (red).
'asymmetry'"asymmetry""asymmetry""asymmetry""asymmetry""asymmetry"

The contour attribute 'asymmetry'"asymmetry""asymmetry""asymmetry""asymmetry""asymmetry" describes the image gradient on both sides of the edge. It is positive if the asymmetric part, i.e., the part with the weaker gradient, is on the right side of the line, while it is negative if the asymmetric part is on the left side of the line (see image below).

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

lines_gausslines_gaussLinesGaussLinesGaussLinesGausslines_gauss

'contrast'"contrast""contrast""contrast""contrast""contrast"

The contrast of a contour describes the difference between the gray values of the line and the gray values of the local background. It is positive if bright lines are extracted, while it is negative for dark lines (see image below).

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

lines_gausslines_gaussLinesGaussLinesGaussLinesGausslines_gauss

(1)
(2)
behavior of the attributes (1) 'asymmetry'"asymmetry""asymmetry""asymmetry""asymmetry""asymmetry" and (2) 'contrast'"contrast""contrast""contrast""contrast""contrast" for a contour along an image structure (the starting point of the contour is marked with a white cross).
'distance'"distance""distance""distance""distance""distance"

The minimum distance to any point or segment of the reference contour (depending on the mode chosen for the calculation) is given in the attribute 'distance'"distance""distance""distance""distance""distance" [px] for all points of a contour.

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

apply_distance_transform_xldapply_distance_transform_xldApplyDistanceTransformXldApplyDistanceTransformXldApplyDistanceTransformXldapply_distance_transform_xld, distance_contours_xlddistance_contours_xldDistanceContoursXldDistanceContoursXldDistanceContoursXlddistance_contours_xld

(1) (2)
(1) 'distance'"distance""distance""distance""distance""distance" of a contour (red) to the points of a reference contour (green) and (2) 'distance'"distance""distance""distance""distance""distance" to any segment of a reference contour (green).

For information about global contour attributes see the operator reference of get_contour_global_attrib_xldget_contour_global_attrib_xldGetContourGlobalAttribXldGetContourGlobalAttribXldGetContourGlobalAttribXldget_contour_global_attrib_xld.

Execution Information

Parameters

ContourContourContourContourcontourcontour (input_object)  xld_cont objectHXLDContHObjectHXLDContHobject

Input XLD contour.

NameNameNameNamenamename (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Name of the attribute.

Default value: 'angle' "angle" "angle" "angle" "angle" "angle"

Suggested values: 'angle'"angle""angle""angle""angle""angle", 'edge_direction'"edge_direction""edge_direction""edge_direction""edge_direction""edge_direction", 'width_right'"width_right""width_right""width_right""width_right""width_right", 'width_left'"width_left""width_left""width_left""width_left""width_left", 'response'"response""response""response""response""response", 'contrast'"contrast""contrast""contrast""contrast""contrast", 'asymmetry'"asymmetry""asymmetry""asymmetry""asymmetry""asymmetry", 'distance'"distance""distance""distance""distance""distance"

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, distance_contours_xlddistance_contours_xldDistanceContoursXldDistanceContoursXldDistanceContoursXlddistance_contours_xld, apply_distance_transform_xldapply_distance_transform_xldApplyDistanceTransformXldApplyDistanceTransformXldApplyDistanceTransformXldapply_distance_transform_xld

See also

query_contour_attribs_xldquery_contour_attribs_xldQueryContourAttribsXldQueryContourAttribsXldQueryContourAttribsXldquery_contour_attribs_xld, get_contour_global_attrib_xldget_contour_global_attrib_xldGetContourGlobalAttribXldGetContourGlobalAttribXldGetContourGlobalAttribXldget_contour_global_attrib_xld, query_contour_global_attribs_xldquery_contour_global_attribs_xldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXldquery_contour_global_attribs_xld

Module

Foundation