closing_circleclosing_circleClosingCircleClosingCircleclosing_circle (Operator)

Name

closing_circleclosing_circleClosingCircleClosingCircleclosing_circle — Close a region with a circular structuring element.

Signature

closing_circle(Region : RegionClosing : Radius : )

Herror closing_circle(const Hobject Region, Hobject* RegionClosing, double Radius)

Herror T_closing_circle(const Hobject Region, Hobject* RegionClosing, const Htuple Radius)

void ClosingCircle(const HObject& Region, HObject* RegionClosing, const HTuple& Radius)

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

HRegion HRegion::ClosingCircle(double Radius) const

static void HOperatorSet.ClosingCircle(HObject region, out HObject regionClosing, HTuple radius)

HRegion HRegion.ClosingCircle(HTuple radius)

HRegion HRegion.ClosingCircle(double radius)

def closing_circle(region: HObject, radius: Union[float, int]) -> HObject

Description

closing_circleclosing_circleClosingCircleClosingCircleClosingCircleclosing_circle behaves analogously to closingclosingClosingClosingClosingclosing, i.e., the regions' boundaries are smoothed and holes within a region which are smaller than the circular structuring element of radius RadiusRadiusRadiusRadiusradiusradius are closed. The closing_circleclosing_circleClosingCircleClosingCircleClosingCircleclosing_circle operation is defined as a dilation followed by a Minkowski subtraction, both with the same circular structuring element.

Attention

closing_circleclosing_circleClosingCircleClosingCircleClosingCircleclosing_circle is applied to each input region separately. If gaps between different regions are to be closed, union1union1Union1Union1Union1union1 or union2union2Union2Union2Union2union2 has to be called first.

Execution Information

Parameters

RegionRegionRegionRegionregionregion (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Regions to be closed.

RegionClosingRegionClosingRegionClosingRegionClosingregionClosingregion_closing (output_object)  region(-array) objectHRegionHObjectHRegionHobject *

Closed regions.

RadiusRadiusRadiusRadiusradiusradius (input_control)  real HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (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 (C)

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);
}

Complexity

Let F1 be the area of the input region. Then the runtime complexity for one region is:

Result

closing_circleclosing_circleClosingCircleClosingCircleClosingCircleclosing_circle returns 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_normClassNdimNormClassNdimNormClassNdimNormclass_ndim_norm

Possible Successors

reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape, area_centerarea_centerAreaCenterAreaCenterAreaCenterarea_center, connectionconnectionConnectionConnectionConnectionconnection

Alternatives

rank_regionrank_regionRankRegionRankRegionRankRegionrank_region, fill_upfill_upFillUpFillUpFillUpfill_up, closingclosingClosingClosingClosingclosing

See also

dilation1dilation1Dilation1Dilation1Dilation1dilation1, minkowski_sub1minkowski_sub1MinkowskiSub1MinkowskiSub1MinkowskiSub1minkowski_sub1, erosion1erosion1Erosion1Erosion1Erosion1erosion1, openingopeningOpeningOpeningOpeningopening

Module

Foundation