opening_circleopening_circleOpeningCircleOpeningCircleOpeningCircle is defined as an erosion followed by a
Minkowski addition with a circular structuring element (see example).
openingopeningOpeningOpeningOpening serves to eliminate small regions (smaller than
the circular structuring element) and to smooth the boundaries of a
region.
Execution Information
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Typical range of values: 0.5
≤
RadiusRadiusRadiusRadiusradius
≤
511.5 (lin)
Minimum increment: 1.0
Recommended increment: 1.0
Example (HDevelop)
* Large regions in an aerial picture (beech trees or meadows):
read_image (Image, 'forest_road')
threshold (Image, Region, 120, 255)
* Close the small gaps.
closing_circle (Region, RegionClosing, 3.5)
* Select the large regions.
opening_circle (RegionClosing, RegionOpening, 19.5)
Example (C)
/* 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);
}
/* Large regions in an aerial picture (beech trees or meadows): */
read_image(&Image, "forest_road");
threshold(Image, &Region, 120.0, 255.0);
/* Close the small gaps. */
closing_circle(Region, &RegionClosing, 3.5);
/* Select the large regions. */
opening_circle(RegionClosing, &RegionOpening, 19.5);
Example (HDevelop)
* Large regions in an aerial picture (beech trees or meadows):
read_image (Image, 'forest_road')
threshold (Image, Region, 120, 255)
* Close the small gaps.
closing_circle (Region, RegionClosing, 3.5)
* Select the large regions.
opening_circle (RegionClosing, RegionOpening, 19.5)
Example (HDevelop)
* Large regions in an aerial picture (beech trees or meadows):
read_image (Image, 'forest_road')
threshold (Image, Region, 120, 255)
* Close the small gaps.
closing_circle (Region, RegionClosing, 3.5)
* Select the large regions.
opening_circle (RegionClosing, RegionOpening, 19.5)
Example (HDevelop)
* Large regions in an aerial picture (beech trees or meadows):
read_image (Image, 'forest_road')
threshold (Image, Region, 120, 255)
* Close the small gaps.
closing_circle (Region, RegionClosing, 3.5)
* Select the large regions.
opening_circle (RegionClosing, RegionOpening, 19.5)
Complexity
Let F1 be the area of the input region. Then the runtime
complexity for one region is:
Result
opening_circleopening_circleOpeningCircleOpeningCircleOpeningCircle returns 2 (H_MSG_TRUE) if all parameters are
correct. The behavior in case of empty or no input region can be
set via:
no region:
set_system('no_object_result',<RegionResult>)