Close a region with a circular structuring element.
closing_circle behaves analogously to closing, i.e., the regions' boundaries are smoothed and holes within a region which are smaller than the circular structuring element of radius Radius are closed. The closing_circle operation is defined as a dilation followed by a Minkowski subtraction, both with the same circular structuring element.
closing_circle is applied to each input region separately. If gaps between different regions are to be closed, union1 or union2 has to be called first.
|
Region (input_object) |
region(-array) -> object |
| Regions to be closed. | |
|
RegionClosing (output_object) |
region(-array) -> object |
| Closed regions. | |
|
Radius (input_control) |
real -> real / integer |
| Radius of the circular structuring element. | |
| Default value: 3.5 | |
| Suggested values: 1.5, 2.5, 3.5, 4.5, 5.5, 7.5, 9.5, 12.5, 15.5, 19.5, 25.5, 33.5, 45.5, 60.5, 110.5 | |
| Typical range of values: 0.5 <= Radius <= 511.5 (lin) | |
| Minimum increment: 1.0 | |
|
Recommended increment: 1.0 | |
my_closing_circle(Hobject In, double Radius, Hobject *Out)
{
Hobject tmp, StructElement;
gen_circle(StructElement,100.0,100.0,Radius);
dilation1(In,StructElement,&tmp,1);
minkowski_sub1(tmp,StructElement,Out,1);
clear_obj(tmp); clear_obj(StructElement);
}
Let F1 be the area of the input region. Then the runtime complexity for one region is:
O(4 * sqrt(F1) * Radius) .
closing_circle 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.
closing_circle is reentrant and automatically parallelized (on tuple level).
threshold, regiongrowing, connection, union1, watersheds, class_ndim_norm
reduce_domain, select_shape, area_center, connection
rank_region, fill_up, closing, closing_circle, closing_golay
dilation1, minkowski_sub1, erosion1, opening
Foundation