ClassesClassesClassesClasses | | | | Operators

opening_circleopening_circleOpeningCircleopening_circleOpeningCircleOpeningCircle (Operator)

Name

opening_circleopening_circleOpeningCircleopening_circleOpeningCircleOpeningCircle — Open a region with a circular structuring element.

Signature

opening_circle(Region : RegionOpening : Radius : )

Herror opening_circle(const Hobject Region, Hobject* RegionOpening, double Radius)

Herror T_opening_circle(const Hobject Region, Hobject* RegionOpening, const Htuple Radius)

Herror opening_circle(Hobject Region, Hobject* RegionOpening, const HTuple& Radius)

HRegion HRegion::OpeningCircle(const HTuple& Radius) const

HRegionArray HRegionArray::OpeningCircle(const HTuple& Radius) const

void OpeningCircle(const HObject& Region, HObject* RegionOpening, const HTuple& Radius)

HRegion HRegion::OpeningCircle(const HTuple& Radius) const

HRegion HRegion::OpeningCircle(double Radius) const

void HOperatorSetX.OpeningCircle(
[in] IHUntypedObjectX* Region, [out] IHUntypedObjectX*RegionOpening, [in] VARIANT Radius)

IHRegionX* HRegionX.OpeningCircle([in] VARIANT Radius)

static void HOperatorSet.OpeningCircle(HObject region, out HObject regionOpening, HTuple radius)

HRegion HRegion.OpeningCircle(HTuple radius)

HRegion HRegion.OpeningCircle(double radius)

Description

opening_circleopening_circleOpeningCircleopening_circleOpeningCircleOpeningCircle is defined as an erosion followed by a Minkowsi addition with a circular structuring element (see example). openingopeningOpeningopeningOpeningOpening serves to eliminate small regions (smaller than the circular structuring element) and to smooth the boundaries of a region.

Parallelization

Parameters

RegionRegionRegionRegionRegionregion (input_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject

Regions to be opened.

RegionOpeningRegionOpeningRegionOpeningRegionOpeningRegionOpeningregionOpening (output_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject *

Opened regions.

RadiusRadiusRadiusRadiusRadiusradius (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

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 Radius Radius Radius Radius radius ≤ 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);
  clear_obj(Circle); clear_obj(tmp);
}

/* 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)

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_circleOpeningCircleopening_circleOpeningCircleOpeningCircle returns 2 (H_MSG_TRUE) if all parameters are correct. The behavior in case of empty or no input region can be set via:

Otherwise, an exception is raised.

Possible Predecessors

thresholdthresholdThresholdthresholdThresholdThreshold, regiongrowingregiongrowingRegiongrowingregiongrowingRegiongrowingRegiongrowing, connectionconnectionConnectionconnectionConnectionConnection, union1union1Union1union1Union1Union1, watershedswatershedsWatershedswatershedsWatershedsWatersheds, class_ndim_normclass_ndim_normClassNdimNormclass_ndim_normClassNdimNormClassNdimNorm

Possible Successors

reduce_domainreduce_domainReduceDomainreduce_domainReduceDomainReduceDomain, select_shapeselect_shapeSelectShapeselect_shapeSelectShapeSelectShape, area_centerarea_centerAreaCenterarea_centerAreaCenterAreaCenter, connectionconnectionConnectionconnectionConnectionConnection

Alternatives

openingopeningOpeningopeningOpeningOpening, dilation1dilation1Dilation1dilation1Dilation1Dilation1, minkowski_add1minkowski_add1MinkowskiAdd1minkowski_add1MinkowskiAdd1MinkowskiAdd1, gen_circlegen_circleGenCirclegen_circleGenCircleGenCircle

See also

transpose_regiontranspose_regionTransposeRegiontranspose_regionTransposeRegionTransposeRegion

Module

Foundation


ClassesClassesClassesClasses | | | | Operators