Remove the result of a hit-or-miss operation from a region (sequential).
thinning_seq calculates the sequential thinning of the input regions with a structuring element from the Golay alphabet (GolayElement). To do so, thinning_seq calls the operator thinning_golay with all possible rotations of the structuring element Iterations times. If Iterations is chosen large enough, the operator calculates the skeleton of a region if the structuring elements 'l' or 'm' are used. For the element 'c' the background and foreground are exchanged in order to have an effect on the interior boundary of a region. If a very large value or 'maximal' is passed for Iterations the iteration stops if no more changes occur. The following structuring elements are available:
'l'
Skeleton, similar to skeleton. This structuring element is
also used in morph_skiz.
'm'
A skeleton with many ``hairs'' and multiple (parallel)
branches.
'd'
A skeleton without multiple branches, but with many gaps,
similar to morph_skeleton.
'c'
Uniform erosion of the region.
'e'
One pixel wide lines are shortened. This structuring element
is also used in morph_skiz.
'i'
Isolated points are removed. (Only Iterations = 1 is useful.)
'f'
Y-junctions are eliminated. (Only Iterations = 1 is useful.)
'f2'
One pixel long branches and corners are removed. (Only
Iterations = 1 is useful.)
'h'
A kind of inner boundary, which is however thicker than the
result of boundary, is generated. (Only Iterations = 1 is
useful.)
'k'
Junction points are eliminated, but also new ones are
generated.
The Golay elements, together with all possible rotations, are
described with the operator golay_elements.
|
Region (input_object) |
region(-array) -> object |
| Regions to be processed. | |
|
RegionThin (output_object) |
region(-array) -> object |
| Result of the thinning operator. | |
|
GolayElement (input_control) |
string -> string |
| Structuring element from the Golay alphabet. | |
| Default value: 'l' | |
| List of values: 'l', 'm', 'd', 'c', 'e', 'i', 'f', 'f2', 'h', 'k' | |
|
Iterations (input_control) |
integer -> integer / string |
| Number of iterations. For 'f', 'f2', 'h' and 'i' the only useful value is 1. | |
| Default value: 20 | |
| Suggested values: 'maximal', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 40, 50, 70, 100, 150, 200 | |
| Typical range of values: 1 <= Iterations | |
| Minimum increment: 1 | |
|
Recommended increment: 1 | |
Let F be the area of an input region. Then the runtime complexity for one region is:
O(Iterations * 6 * sqrt(F)) .
thinning_seq returns 2 (H_MSG_TRUE) if all parameters are correct. The behavior in case of empty or no input region can be set via:
a) no region: set_system('no_object_result',<RegionResult>)
b) empty region: set_system('empty_region_result',<RegionResult>)
Otherwise, an exception is raised.
thinning_seq is reentrant and automatically parallelized (on tuple level).
threshold, regiongrowing, connection, union1, watersheds, class_ndim_norm, gen_circle, gen_ellipse, gen_rectangle1, gen_rectangle2, draw_region, gen_region_points, gen_struct_elements, gen_region_polygon_filled
pruning, reduce_domain, select_shape, area_center, connection, complement
skeleton, morph_skiz, expand_region
hit_or_miss_seq, erosion_golay, difference, thinning_golay, thinning, thickening_seq
Foundation