Separate overlapping regions.
The opening_seg operation is defined as a sequence of the following operators: erosion1, connection and dilation1 (see example). Only one iteration is done in erosion1 and dilation1.
opening_seg serves to separate overlapping regions whose area of overlap is smaller than StructElement. It should be noted that the resulting regions can overlap without actually merging (see expand). opening_seg uses the center of gravity as the reference point of the structuring element.
Structuring elements (StructElement) 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 opened. |
StructElement (input_object) |
region -> object |
Structuring element (position-invariant). |
RegionOpening (output_object) |
region-array -> object |
Opened regions. |
/* Simulation of opening_seg */ opening_seg(Region,StructElement:RegionOpening::): erosion1(Region,StructElement:H1:1:) > connection(H1:H2::) > dilation1(H2,StructElement:RegionOpening:1:) > clear([H1,H2]:::).
Let F1 be the area of the input region, and F2 be the area of the structuring element. The the runtime complexity for one region is:
O(sqrt(F1) * sqrt(F2) * sqrt(sqrt(F1)) .
opening_seg 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
expand, reduce_domain, select_shape, area_center, connection
erosion1, connection, dilation1