ClassesClassesClassesClasses | | | | Operators

closing_rectangle1closing_rectangle1ClosingRectangle1closing_rectangle1ClosingRectangle1ClosingRectangle1 (Operator)

Name

closing_rectangle1closing_rectangle1ClosingRectangle1closing_rectangle1ClosingRectangle1ClosingRectangle1 — Close a region with a rectangular structuring element.

Signature

closing_rectangle1(Region : RegionClosing : Width, Height : )

Herror closing_rectangle1(const Hobject Region, Hobject* RegionClosing, const Hlong Width, const Hlong Height)

Herror T_closing_rectangle1(const Hobject Region, Hobject* RegionClosing, const Htuple Width, const Htuple Height)

Herror closing_rectangle1(Hobject Region, Hobject* RegionClosing, const HTuple& Width, const HTuple& Height)

HRegion HRegion::ClosingRectangle1(const HTuple& Width, const HTuple& Height) const

HRegionArray HRegionArray::ClosingRectangle1(const HTuple& Width, const HTuple& Height) const

void ClosingRectangle1(const HObject& Region, HObject* RegionClosing, const HTuple& Width, const HTuple& Height)

HRegion HRegion::ClosingRectangle1(Hlong Width, Hlong Height) const

void HOperatorSetX.ClosingRectangle1(
[in] IHUntypedObjectX* Region, [out] IHUntypedObjectX*RegionClosing, [in] VARIANT Width, [in] VARIANT Height)

IHRegionX* HRegionX.ClosingRectangle1(
[in] Hlong Width, [in] Hlong Height)

static void HOperatorSet.ClosingRectangle1(HObject region, out HObject regionClosing, HTuple width, HTuple height)

HRegion HRegion.ClosingRectangle1(int width, int height)

Description

closing_rectangle1closing_rectangle1ClosingRectangle1closing_rectangle1ClosingRectangle1ClosingRectangle1 performs a dilation_rectangle1dilation_rectangle1DilationRectangle1dilation_rectangle1DilationRectangle1DilationRectangle1 followed by an erosion_rectangle1erosion_rectangle1ErosionRectangle1erosion_rectangle1ErosionRectangle1ErosionRectangle1 on the input region RegionRegionRegionRegionRegionregion. The size of the rectangular structuring element is determined by the parameters WidthWidthWidthWidthWidthwidth and HeightHeightHeightHeightHeightheight. As is the case for all closingclosingClosingclosingClosingClosing variants, regions' boundaries are smoothed and holes within a region which are smaller than the rectangular structuring element are closed.

Attention

closing_rectangle1closing_rectangle1ClosingRectangle1closing_rectangle1ClosingRectangle1ClosingRectangle1 is applied to each input region separately. If gaps between different regions are to be closed, union1union1Union1union1Union1Union1 or union2union2Union2union2Union2Union2 has to be called first.

Parallelization

Parameters

RegionRegionRegionRegionRegionregion (input_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject

Regions to be closed.

RegionClosingRegionClosingRegionClosingRegionClosingRegionClosingregionClosing (output_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject *

Closed regions.

WidthWidthWidthWidthWidthwidth (input_control)  extent.x HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Width of the structuring rectangle.

Default value: 10

Suggested values: 1, 2, 3, 4, 5, 7, 9, 12, 15, 19, 25, 33, 45, 60, 110, 150, 200

Typical range of values: 1 ≤ Width Width Width Width Width width ≤ 511 (lin)

Minimum increment: 1

Recommended increment: 1

HeightHeightHeightHeightHeightheight (input_control)  extent.y HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Height of the structuring rectangle.

Default value: 10

Suggested values: 1, 2, 3, 4, 5, 7, 9, 12, 15, 19, 25, 33, 45, 60, 110, 150, 200

Typical range of values: 1 ≤ Height Height Height Height Height height ≤ 511 (lin)

Minimum increment: 1

Recommended increment: 1

Complexity

Let F1 be the area of an input region and H be the height of the rectangle. Then the runtime complexity for one region is:

Result

closing_rectangle1closing_rectangle1ClosingRectangle1closing_rectangle1ClosingRectangle1ClosingRectangle1 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

closingclosingClosingclosingClosingClosing

See also

dilation_rectangle1dilation_rectangle1DilationRectangle1dilation_rectangle1DilationRectangle1DilationRectangle1, erosion_rectangle1erosion_rectangle1ErosionRectangle1erosion_rectangle1ErosionRectangle1ErosionRectangle1, opening_rectangle1opening_rectangle1OpeningRectangle1opening_rectangle1OpeningRectangle1OpeningRectangle1, gen_rectangle1gen_rectangle1GenRectangle1gen_rectangle1GenRectangle1GenRectangle1

Module

Foundation


ClassesClassesClassesClasses | | | | Operators