ClassesClasses | | Operators

closing_rectangle1closing_rectangle1ClosingRectangle1ClosingRectangle1 (Operator)

Name

closing_rectangle1closing_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)

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

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

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

HRegion HRegion.ClosingRectangle1(int width, int height)

Description

closing_rectangle1closing_rectangle1ClosingRectangle1ClosingRectangle1ClosingRectangle1 performs a dilation_rectangle1dilation_rectangle1DilationRectangle1DilationRectangle1DilationRectangle1 followed by an erosion_rectangle1erosion_rectangle1ErosionRectangle1ErosionRectangle1ErosionRectangle1 on the input region RegionRegionRegionRegionregion. The size of the rectangular structuring element is determined by the parameters WidthWidthWidthWidthwidth and HeightHeightHeightHeightheight. As is the case for all closingclosingClosingClosingClosing variants, regions' boundaries are smoothed and holes within a region which are smaller than the rectangular structuring element are closed.

Attention

closing_rectangle1closing_rectangle1ClosingRectangle1ClosingRectangle1ClosingRectangle1 is applied to each input region separately. If gaps between different regions are to be closed, union1union1Union1Union1Union1 or union2union2Union2Union2Union2 has to be called first.

Execution Information

Parameters

RegionRegionRegionRegionregion (input_object)  region(-array) objectHRegionHRegionHobject

Regions to be closed.

RegionClosingRegionClosingRegionClosingRegionClosingregionClosing (output_object)  region(-array) objectHRegionHRegionHobject *

Closed regions.

WidthWidthWidthWidthwidth (input_control)  extent.x HTupleHTupleHtuple (integer) (int / long) (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 ≤ 511 (lin)

Minimum increment: 1

Recommended increment: 1

HeightHeightHeightHeightheight (input_control)  extent.y HTupleHTupleHtuple (integer) (int / long) (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 ≤ 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_rectangle1ClosingRectangle1ClosingRectangle1ClosingRectangle1 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

thresholdthresholdThresholdThresholdThreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowing, connectionconnectionConnectionConnectionConnection, union1union1Union1Union1Union1, watershedswatershedsWatershedsWatershedsWatersheds, class_ndim_normclass_ndim_normClassNdimNormClassNdimNormClassNdimNorm

Possible Successors

reduce_domainreduce_domainReduceDomainReduceDomainReduceDomain, select_shapeselect_shapeSelectShapeSelectShapeSelectShape, area_centerarea_centerAreaCenterAreaCenterAreaCenter, connectionconnectionConnectionConnectionConnection

Alternatives

closingclosingClosingClosingClosing

See also

dilation_rectangle1dilation_rectangle1DilationRectangle1DilationRectangle1DilationRectangle1, erosion_rectangle1erosion_rectangle1ErosionRectangle1ErosionRectangle1ErosionRectangle1, opening_rectangle1opening_rectangle1OpeningRectangle1OpeningRectangle1OpeningRectangle1, gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1

Module

Foundation


ClassesClasses | | Operators