closing_rectangle1closing_rectangle1ClosingRectangle1ClosingRectangle1closing_rectangle1闭矩形1(算子)

名称

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 在输入区域 RegionRegionRegionRegionregionregion 上采用矩形结构元素,其行为与 closingclosingClosingClosingClosingclosing 算法一致。矩形结构元素的尺寸由参数 WidthWidthWidthWidthwidthwidthHeightHeightHeightHeightheightheight 决定。与所有 closingclosingClosingClosingClosingclosing 变体相同,区域边界将被平滑处理,且区域内小于矩形结构元素的孔洞将被封闭。

erosion_rectangle1erosion_rectangle1ErosionRectangle1ErosionRectangle1ErosionRectangle1erosion_rectangle1dilation_rectangle1dilation_rectangle1DilationRectangle1DilationRectangle1DilationRectangle1dilation_rectangle1 类似,closing_rectangle1closing_rectangle1ClosingRectangle1ClosingRectangle1ClosingRectangle1closing_rectangle1 也是一个非常快速的操作。

注意

closing_rectangle1closing_rectangle1ClosingRectangle1ClosingRectangle1ClosingRectangle1closing_rectangle1 对每个输入区域分别应用。若要消除不同区域之间的间隙,必须先调用 union1union1Union1Union1Union1union1union2union2Union2Union2Union2union2

执行信息

参数

RegionRegionRegionRegionregionregion (输入对象)  region(-array) objectHRegionHObjectHRegionHobject

待关闭的区域。

RegionClosingRegionClosingRegionClosingRegionClosingregionClosingregion_closing (输出对象)  region(-array) objectHRegionHObjectHRegionHobject *

关闭区域。

WidthWidthWidthWidthwidthwidth (输入控制)  extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

结构矩形的宽度。

默认值: 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 (输入控制)  extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

结构矩形的高度。

默认值: 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

复杂度

设 F1 为输入区域的面积,H 为矩形高度。则单个区域的运行时间复杂度为:

结果

closing_rectangle1closing_rectangle1ClosingRectangle1ClosingRectangle1ClosingRectangle1closing_rectangle1 在所有参数正确时返回 2 (H_MSG_TRUE)。当输入区域为空或不存在时,其行为可通过以下方式设置:

否则,将抛出异常。

可能的前趋

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

模块

基础