closing_rectangle1closing_rectangle1ClosingRectangle1ClosingRectangle1closing_rectangle1 (Operator)

名称

closing_rectangle1closing_rectangle1ClosingRectangle1ClosingRectangle1closing_rectangle1 — 用矩形结构元素关闭一个区域。

签名

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)

def closing_rectangle1(region: HObject, width: int, height: int) -> HObject

描述

closing_rectangle1closing_rectangle1ClosingRectangle1ClosingRectangle1ClosingRectangle1closing_rectangle1 behaves as closingclosingClosingClosingClosingclosing with a rectangular structuring element 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.

Similar to erosion_rectangle1erosion_rectangle1ErosionRectangle1ErosionRectangle1ErosionRectangle1erosion_rectangle1 and dilation_rectangle1dilation_rectangle1DilationRectangle1DilationRectangle1DilationRectangle1dilation_rectangle1 closing_rectangle1closing_rectangle1ClosingRectangle1ClosingRectangle1ClosingRectangle1closing_rectangle1 is a very fast operation.

注意

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

执行信息

参数

RegionRegionRegionRegionregionregion (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Regions to be closed.

RegionClosingRegionClosingRegionClosingRegionClosingregionClosingregion_closing (output_object)  region(-array) objectHRegionHObjectHRegionHobject *

Closed regions.

WidthWidthWidthWidthwidthwidth (input_control)  extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Width of the structuring rectangle.

默认值: 10

建议值: 1, 2, 3, 4, 5, 7, 9, 12, 15, 19, 25, 33, 45, 60, 110, 150, 200

值范围: 1 ≤ Width Width Width Width width width ≤ 511 (lin)

最小增量: 1

建议增量: 1

HeightHeightHeightHeightheightheight (input_control)  extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Height of the structuring rectangle.

默认值: 10

建议值: 1, 2, 3, 4, 5, 7, 9, 12, 15, 19, 25, 33, 45, 60, 110, 150, 200

值范围: 1 ≤ Height Height Height Height height height ≤ 511 (lin)

最小增量: 1

建议增量: 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:

结果

closing_rectangle1closing_rectangle1ClosingRectangle1ClosingRectangle1ClosingRectangle1closing_rectangle1 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.

可能的前置算子

thresholdthresholdThresholdThresholdThresholdthreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionConnectionconnection, union1union1Union1Union1Union1union1, watershedswatershedsWatershedsWatershedsWatershedswatersheds, class_ndim_normclass_ndim_normClassNdimNormClassNdimNormClassNdimNormclass_ndim_norm

可能的后继算子

reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape, area_centerarea_centerAreaCenterAreaCenterAreaCenterarea_center, connectionconnectionConnectionConnectionConnectionconnection

替代算子

closingclosingClosingClosingClosingclosing

另见

dilation_rectangle1dilation_rectangle1DilationRectangle1DilationRectangle1DilationRectangle1dilation_rectangle1, erosion_rectangle1erosion_rectangle1ErosionRectangle1ErosionRectangle1ErosionRectangle1erosion_rectangle1, opening_rectangle1opening_rectangle1OpeningRectangle1OpeningRectangle1OpeningRectangle1opening_rectangle1, gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1gen_rectangle1

模块

Foundation