Remove the result of a hit-or-miss operation from a region.
thinning performs a thinning of the input regions using morphological operations. The operator first applies a hit-or-miss-transformation to Region (cf.hit_or_miss), and then removes the detected points from the input region. The parameter Iterations determines the number of iterations performed.
For the choice of the structuring elements StructElement1 and StructElement2, as well as for Row and Column, the same restrictions described under hit_or_miss apply.
Structuring elements (StructElement1, StructElement2) can be generated with operators such as circle, rectangle1, rectangle2, ellipse, draw_region, store_polygon, store_coord, etc.
Region (input_object) |
region(-array) -> object |
Regions to be processed. |
StructElement1 (input_object) |
region -> object |
Structuring element for the foreground. |
StructElement2 (input_object) |
region -> object |
Structuring element for the background. |
RegionThin (output_object) |
region(-array) -> object |
Result of the thinning operator. |
Row (input_control) |
point.y -> integer |
Row coordinate of the reference point. | |
Default value: 0 | |
Range of values: 0 <= Row <= 511 (lin) | |
Minimum increment: 1 | |
Recommended increment: 1 |
Column (input_control) |
point.x -> integer |
Column coordinate of the reference point. | |
Default value: 0 | |
Range of values: 0 <= Column <= 511 (lin) | |
Minimum increment: 1 | |
Recommended increment: 1 |
Iterations (input_control) |
integer -> integer |
Number of iterations. | |
Default value: 1 | |
Suggested values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 17, 20, 30, 40, 50 | |
Range of values: 1 <= Iterations | |
Minimum increment: 1 | |
Recommended increment: 1 |
Let F be the area of an input region, F1 the area of the structuring element 1, and F2 the area of the structuring element 2. Then the runtime complexity for one object is:
O(Iterations * sqrt(F) * (sqrt(F1) + sqrt(F2))) .
thinning returns 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.
threshold__, regiongrowing__, connection, union1, watersheds, class_ndim1__, circle, ellipse, rectangle1, rectangle2, draw_region, store_coord, struct_elements, store_filled_polygon
reduce_domain, select_shape, area_center, connection