Herror ::split_contours_xld (
    Hobject Polygons,
    Hobject *Contours,
    const HTuple &Mode,
    const HTuple &Weight,
    const HTuple &Smooth
)
HXLDCont HXLDPoly::SplitContoursXld (
    const HTuple &Mode,
    const HTuple &Weight,
    const HTuple &Smooth
) const
HXLDContArray HXLDPolyArray::SplitContoursXld (
    const HTuple &Mode,
    const HTuple &Weight,
    const HTuple &Smooth
) const

Split XLD contours at dominant points.

::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 Weight * 2 * PI / contour length, and for which in the (empirically determined) neighborhood of sqrt(Smooth) * ln(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.


Parameters

Polygons (input_object)
xld_poly(-array) -> Hobject: HXLDPoly(Array)
Polygons for which the corresponding contours are to be split.

Contours (output_object)
xld_cont(-array) -> Hobject * : HXLDCont(Array)
Split contours.

Mode (input_control)
string -> HTuple.char *
Mode for the splitting of the contours.
Default value: 'polygon'
List of values: 'polygon', 'dominant'

Weight (input_control)
integer -> HTuple.long
Weight for the sensitiveness.
Default value: 1

Smooth (input_control)
integer -> HTuple.long
Width of the smoothing mask.
Default value: 5


Possible Predecessors

::gen_polygons_xld


Possible Successors

::regress_contours_xld


See also

::gen_contours_skeleton_xld, ::lines_gauss, ::lines_facet, ::edges_sub_pix


Module

Sub-pixel operators



Copyright © 1996-2002 MVTec Software GmbH