get_contour_attrib_xldT_get_contour_attrib_xldGetContourAttribXldGetContourAttribXld (Operator)

Name

get_contour_attrib_xldT_get_contour_attrib_xldGetContourAttribXldGetContourAttribXld — 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)

Description

get_contour_attrib_xldget_contour_attrib_xldGetContourAttribXldGetContourAttribXldGetContourAttribXld returns the values of the attribute NameNameNameNamename of the XLD contour ContourContourContourContourcontour in AttribAttribAttribAttribattrib. Contour point attributes are additional values defined for each contour point and describe local features. query_contour_attribs_xldquery_contour_attribs_xldQueryContourAttribsXldQueryContourAttribsXldQueryContourAttribsXld 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"

The direction of the normal vectors of the contour is described by '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" is added by the following operators:

edges_color_sub_pixedges_color_sub_pixEdgesColorSubPixEdgesColorSubPixEdgesColorSubPix, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPix, lines_colorlines_colorLinesColorLinesColorLinesColor, lines_facetlines_facetLinesFacetLinesFacetLinesFacet, lines_gausslines_gaussLinesGaussLinesGaussLinesGauss

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

edges_color_sub_pixedges_color_sub_pixEdgesColorSubPixEdgesColorSubPixEdgesColorSubPix, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPix, lines_colorlines_colorLinesColorLinesColorLinesColor, lines_facetlines_facetLinesFacetLinesFacetLinesFacet, lines_gausslines_gaussLinesGaussLinesGaussLinesGauss

'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" [px] (see image below).

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

lines_colorlines_colorLinesColorLinesColorLinesColor, lines_gausslines_gaussLinesGaussLinesGaussLinesGauss

'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" [px] (see image below).

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

lines_colorlines_colorLinesColorLinesColorLinesColor, lines_gausslines_gaussLinesGaussLinesGaussLinesGauss

(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" (with respect to the row axis), representing the normal for every point of the contour, (2) behaviour of the attribute '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" (yellow) and 'width_left'"width_left""width_left""width_left""width_left" (green).
'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" [rad] is added by the following operators:

edges_color_sub_pixedges_color_sub_pixEdgesColorSubPixEdgesColorSubPixEdgesColorSubPix, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPix

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

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

lines_gausslines_gaussLinesGaussLinesGaussLinesGauss

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

lines_gausslines_gaussLinesGaussLinesGaussLinesGauss

(1)
(2)
Behaviour of the attributes (1) 'asymmetry'"asymmetry""asymmetry""asymmetry""asymmetry" and (2) '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"

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" [px] for all points of a contour.

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

apply_distance_transform_xldapply_distance_transform_xldApplyDistanceTransformXldApplyDistanceTransformXldApplyDistanceTransformXld, distance_contours_xlddistance_contours_xldDistanceContoursXldDistanceContoursXldDistanceContoursXld

(1) (2)
(1) 'distance'"distance""distance""distance""distance" of a contour (red) to the points of a reference contour (green) and (2) '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_xldGetContourGlobalAttribXldGetContourGlobalAttribXldGetContourGlobalAttribXld.

Execution Information

Parameters

ContourContourContourContourcontour (input_object)  xld_cont objectHXLDContHXLDContHobject

Input XLD contour.

NameNameNameNamename (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Name of the attribute.

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

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

AttribAttribAttribAttribattrib (output_control)  real-array HTupleHTupleHtuple (real) (double) (double) (double)

Attribute values.

Possible Predecessors

lines_gausslines_gaussLinesGaussLinesGaussLinesGauss, lines_facetlines_facetLinesFacetLinesFacetLinesFacet, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPix, distance_contours_xlddistance_contours_xldDistanceContoursXldDistanceContoursXldDistanceContoursXld, apply_distance_transform_xldapply_distance_transform_xldApplyDistanceTransformXldApplyDistanceTransformXldApplyDistanceTransformXld

See also

query_contour_attribs_xldquery_contour_attribs_xldQueryContourAttribsXldQueryContourAttribsXldQueryContourAttribsXld, get_contour_global_attrib_xldget_contour_global_attrib_xldGetContourGlobalAttribXldGetContourGlobalAttribXldGetContourGlobalAttribXld, query_contour_global_attribs_xldquery_contour_global_attribs_xldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXld

Module

Foundation