Open a region with a circular structuring element.
::opening_circle is defined as an erosion followed by a Minkowsi addition with a circular structuring element (see example). ::opening serves to eliminate small regions (smaller than the circular structuring element) and to smooth the boundaries of a region.
|
Region (input_object) |
region(-array) -> Hobject: HRegion(Array) |
| Regions to be opened. | |
|
RegionOpening (output_object) |
region(-array) -> Hobject * : HRegion(Array) |
| Opened regions. | |
|
Radius (input_control) |
real -> HTuple.double / long |
| 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 | |
/* simulation of opening_circle */
my_opening_circle(Hobject In, double Radius, Hobject *Out)
{
Hobject Circle, tmp;
gen_circle(&Circle,100.0,100.0,Radius);
erosion1(Region,Circle,&tmp,1);
minkowski_add1(tmp,Circle,&Out,1);
clear_obj(Circle); clear_obj(tmp);
}
/* Large regions in an aerial picture (beech trees or meadows): */
read_image(&Image,"wald1");
threshold(Image,&Light,80.0,255.0);
/* close the small gap */
closing_circle(Light,&H,2.5);
/* selecting the large regions */
opening_circle(H,&Large,20.5);
Let F1 be the area of the input region. Then the runtime complexity for one region is:
O(4 * sqrt(F1) * Radius) .
::opening_circle returns 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.
::threshold, ::regiongrowing, ::connection, ::union1, ::watersheds, ::class_ndim_norm
::reduce_domain, ::select_shape, ::area_center, ::connection
::opening, ::dilation1, ::minkowski_add1, ::gen_circle
Morphology