union_straight_contours_xldunion_straight_contours_xldUnionStraightContoursXldUnionStraightContoursXld — Compute the union of neighboring straight contours that have a similar
direction.
union_straight_contours_xldunion_straight_contours_xldUnionStraightContoursXldUnionStraightContoursXldUnionStraightContoursXld merges neighboring XLD contours
ContoursContoursContoursContourscontours if certain criteria are fulfilled. At each
iteration, at most two contours that fulfill the given criteria are
merged. The parameter IterationsIterationsIterationsIterationsiterations controls how often this
step is executed.
Two contours are merged if the shortest distance between their end
points (end points are the projections of the contours' first and
last points onto its regression line) is smaller than
MaxDistMaxDistMaxDistMaxDistmaxDist, and if the difference in direction (i.e., the
regression lines' direction) is smaller than MaxDiffMaxDiffMaxDiffMaxDiffmaxDiff
(radians).
If only one of the criteria is fulfilled, the decision on merging can
be influenced by the weighting factor PercentPercentPercentPercentpercent, which
allows the exceeding of one limit to be balanced by the other value
remaining below the limit by the same amount. The end point
distance is weighted by PercentPercentPercentPercentpercent, while the directional
difference is weighted by 100 - PercentPercentPercentPercentpercent.
This means that two contours are merged if they fulfill the following
condition:
In case there are parallel contours, there is a danger of merging
neighboring contours. If this is to be avoided, ModeModeModeModemode =
'noparallel' has to be chosen, while otherwise ModeModeModeModemode =
'paralleltoo' suffices. For ModeModeModeModemode = 'every', contours are
merged unconditionally. All other parameters have no influence in
this case.
The parameters of the regression line are calculated anew for merged
contours.
List of values: 'every'"every""every""every""every", 'noparallel'"noparallel""noparallel""noparallel""noparallel", 'paralleltoo'"paralleltoo""paralleltoo""paralleltoo""paralleltoo"