Operator Reference
get_contour_attrib_xld (Operator)
get_contour_attrib_xld
— Return point attribute values of an XLD contour.
Signature
Description
get_contour_attrib_xld
returns the values of the
attribute Name
of the XLD contour Contour
in
Attrib
. Contour point attributes are additional values defined for
each contour point and describe local features.
query_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'
-
The direction of the normal vectors of the contour is described by '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' is added by the following operators:
edges_color_sub_pix
,edges_sub_pix
,lines_color
,lines_facet
,lines_gauss
- 'response'
-
'response' contains the magnitude of the edge gradient (see image below).
The attribute 'response' is added by the following operators:
edges_color_sub_pix
,edges_sub_pix
,lines_color
,lines_facet
,lines_gauss
- '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' [px] (see image below).
The attribute 'width_right' is added by the following operators:
- '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' [px] (see image below).
The attribute 'width_left' is added by the following operators:
( 1) ( 2) ( 3) - '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' [rad] is added by the following operators:
edges_color_sub_pix
,edges_sub_pix
- 'asymmetry'
-
The contour attribute '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' is added by the following operator:
- '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' is added by the following operator:
( 1) ( 2) - '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' [px] for all points of a contour.
The attribute 'distance' is added by the following operators:
apply_distance_transform_xld
,distance_contours_xld
( 1) ( 2)
For information about global contour attributes see the operator reference
of get_contour_global_attrib_xld
.
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
Contour
(input_object) xld_cont →
object
Input XLD contour.
Name
(input_control) string →
(string)
Name of the attribute.
Default: 'angle'
Suggested values: 'angle' , 'edge_direction' , 'width_right' , 'width_left' , 'response' , 'contrast' , 'asymmetry' , 'distance'
Attrib
(output_control) real-array →
(real)
Attribute values.
Possible Predecessors
lines_gauss
,
lines_facet
,
edges_sub_pix
,
distance_contours_xld
,
apply_distance_transform_xld
See also
query_contour_attribs_xld
,
get_contour_global_attrib_xld
,
query_contour_global_attribs_xld
Module
Foundation