split_contours_xldπ
Short descriptionπ
split_contours_xld β Split XLD contours at dominant points.
Signatureπ
split_contours_xld( xld_poly Polygons, out xld_cont Contours, string Mode, integer Weight, integer Smooth )
Descriptionπ
split_contours_xld splits the contours which were used
to generate the polygons Polygons at prominent points.
If the mode 'polygon' is selected, the contours are split
at the polygonsβ control points. In mode 'dominant', they
are split at dominant points, i.e., at points for which the
calculated change of direction is larger than the (empirically
determined) threshold \(2 \pi \textrm{Weight}/\mbox{\it contour length}\), and for which
in the (empirically determined) neighborhood of
\(\sqrt{ \textrm{Smooth}} * \log(\mbox{\it contour length})\) points
no larger change of direction occurs. The contour direction is
determined from the direction of the regression line (i.e., the
least-squares approximating line) through all points in a
neighborhood of Smooth points around a contour point.
The directions thus determined are smoothed with a Gaussian of width
Smooth. Weight is a weighting factor for the
sensitiveness of the operator. The larger Weight is
selected, the less dominant points are found.
Each polygon needs a reference to a contour. If the reference is missing,
because the polygon is e.g., read from a DXF-File, split_contours_xld
returns an error.
Execution informationπ
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π
Polygons (input_object) xld_poly(-array) β object
Polygons for which the corresponding contours are to be split.
Contours (output_object) xld_cont(-array) β object
Split contours.
Mode (input_control) string β (string)
Mode for the splitting of the contours.
Default: 'polygon'
List of values: 'dominant', 'polygon'
Weight (input_control) integer β (integer)
Weight for the sensitiveness.
Default: 1
Smooth (input_control) integer β (integer)
Width of the smoothing mask.
Default: 5
Combinations with other operatorsπ
Combinations
Possible predecessors
Possible successors
See also
gen_contours_skeleton_xld, lines_gauss, lines_facet, edges_sub_pix
Moduleπ
Foundation