Convert a region into XLD contours.
gen_contour_xld converts the input region EdgeRegion, which is assumed to contain mostly one pixel wide regions (see skeleton), into an XLD contour. The regions are first transformed to contain only line segments in 8-neighborhood. This has two disadvantages: Wide lines may be split into disconnected line segments, and junction points in 4-neighborhood can be dismembered.
After this, all XLD contours are returned in the paramerter Contours if they contain more than Length points. Adjacencies between contours or the openness or closedness are ignored.
The used algorithm of the Object Recognition Toolkit (ORT, Version 2.3, A. Etemadi, Imperial College of Science, Technology, and Medicine, London 1993) does not split contours at junction points, but rather follows an arbitrary adjacent contour. This makes it very difficult to determine adjacencies between contours after they have been generated.
EdgeRegion (input_object) |
region -> object |
Skeleton of which the contours are to be determined. |
Contours (output_object) |
xld_cont-array -> object |
Resulting contours. |
Length (input_control) |
integer -> integer |
Minimum number of points a contour has to have. | |
Default value: 1 | |
Suggested values: 1, 2, 3, 5, 10, 20 |
smooth_cont_xld, get_contour_xld, poly_xld
edges__, threshold__, fetch_contour