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
Herror T_get_contour_attrib_xld(const Hobject Contour, const Htuple Name, Htuple* Attrib)
def get_contour_attrib_xld(contour: HObject, name: str) -> Sequence[float]
Description
get_contour_attrib_xldget_contour_attrib_xldGetContourAttribXldGetContourAttribXldget_contour_attrib_xld
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_xldQueryContourAttribsXldQueryContourAttribsXldquery_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"
-
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_pixEdgesColorSubPixEdgesColorSubPixedges_color_sub_pix
, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixedges_sub_pix
,
lines_colorlines_colorLinesColorLinesColorlines_color
, lines_facetlines_facetLinesFacetLinesFacetlines_facet
, lines_gausslines_gaussLinesGaussLinesGausslines_gauss
- '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_pixEdgesColorSubPixEdgesColorSubPixedges_color_sub_pix
, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixedges_sub_pix
,
lines_colorlines_colorLinesColorLinesColorlines_color
, lines_facetlines_facetLinesFacetLinesFacetlines_facet
, lines_gausslines_gaussLinesGaussLinesGausslines_gauss
- '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_colorLinesColorLinesColorlines_color
, lines_gausslines_gaussLinesGaussLinesGausslines_gauss
- '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_colorLinesColorLinesColorlines_color
, lines_gausslines_gaussLinesGaussLinesGausslines_gauss
- '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_pixEdgesColorSubPixEdgesColorSubPixedges_color_sub_pix
, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixedges_sub_pix
- '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_gaussLinesGaussLinesGausslines_gauss
- '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_gaussLinesGaussLinesGausslines_gauss
- '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_xldApplyDistanceTransformXldApplyDistanceTransformXldapply_distance_transform_xld
, distance_contours_xlddistance_contours_xldDistanceContoursXldDistanceContoursXlddistance_contours_xld
For information about global contour attributes see the operator reference
of get_contour_global_attrib_xldget_contour_global_attrib_xldGetContourGlobalAttribXldGetContourGlobalAttribXldget_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
ContourContourContourcontourcontour
(input_object) xld_cont →
objectHXLDContHObjectHObjectHobject
Input XLD contour.
NameNameNamenamename
(input_control) string →
HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Name of the attribute.
Default:
'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 →
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
,
distance_contours_xlddistance_contours_xldDistanceContoursXldDistanceContoursXlddistance_contours_xld
,
apply_distance_transform_xldapply_distance_transform_xldApplyDistanceTransformXldApplyDistanceTransformXldapply_distance_transform_xld
See also
query_contour_attribs_xldquery_contour_attribs_xldQueryContourAttribsXldQueryContourAttribsXldquery_contour_attribs_xld
,
get_contour_global_attrib_xldget_contour_global_attrib_xldGetContourGlobalAttribXldGetContourGlobalAttribXldget_contour_global_attrib_xld
,
query_contour_global_attribs_xldquery_contour_global_attribs_xldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXldquery_contour_global_attribs_xld
Module
Foundation