parallels_xld ( Polygons : Parallels : Len, Dist, Alpha : )

Extract parallel XLD polygons.

parallels_xld examines the XLD polygons passed in Polygons for parallelism. The resulting parallel polygons are returned in Parallels. Whether two polygon segments are parallel depends on their distance (smaller than Dist), a maximum allowed angle difference (Alpha, in radians), and a minimum length of the two polygon segments. Furthermore, the two segments have to overlap. As a side effect, a quality factor is calculated for each pair of parallels. It is based on the normalized angular difference and the normalized length of the overlap area:

          PI-delta_alpha   2*overlap
quality = -------------- * ---------    with (0 <= quality <= 1)
               PI/2        len1+len2
Here, @delta_alpha is the angle difference of the polygon segments, overlap is the length of the overlap area, len1 and len2 the length of the polygon segments, and quality the resulting quality factor.

The quality factor is a measure of parallelism (the larger its value, the ``more parallel'' the polygons). Finally, the quality factors of all parallel polygon segments contained in a single polygon are added, weighted with their length of the overlapping area.


Parameters

Polygons (input_object)
xld_poly-array -> object
Input polygons.

Parallels (output_object)
xld_para-array -> object
Parallel polygons.

Len (input_control)
number -> real / integer
Mimimum length of the individual polygon segments.
Default value: 10.0
Suggested values: 5.0, 10.0, 15.0, 20.0
Restriction: Len > 0.0

Dist (input_control)
number -> real / integer
Maximum distance of the polygon segments.
Default value: 30.0
Suggested values: 20.0, 25.0, 30.0, 40.0, 50.0, 75.0
Restriction: Dist > 0.0

Alpha (input_control)
number -> real / integer
Maximum angle difference of the polygon segments.
Default value: 0.15
Suggested values: 0.05, 0.10, 0.15, 0.20, 0.30
Restriction: (0 <= Alpha) && (Alpha <= (pi / 2))


Possible Predecessors

poly_xld


Possible Successors

mod_para_xld, get_poly_parallel_xld



Copyright © 1996-1997 MVTec Software GmbH