erosion_rectangle1erosion_rectangle1ErosionRectangle1ErosionRectangle1erosion_rectangle1 (算子名称)

名称

erosion_rectangle1erosion_rectangle1ErosionRectangle1ErosionRectangle1erosion_rectangle1 — Erode a region with a rectangular structuring element.

参数签名

erosion_rectangle1(区域 : RegionErosion : Width, Height : )

Herror erosion_rectangle1(const Hobject 区域, Hobject* RegionErosion, const Hlong Width, const Hlong Height)

Herror T_erosion_rectangle1(const Hobject 区域, Hobject* RegionErosion, const Htuple Width, const Htuple Height)

void ErosionRectangle1(const HObject& 区域, HObject* RegionErosion, const HTuple& Width, const HTuple& Height)

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

static void HOperatorSet.ErosionRectangle1(HObject 区域, out HObject regionErosion, HTuple width, HTuple height)

HRegion HRegion.ErosionRectangle1(int width, int height)

def erosion_rectangle1(区域: HObject, width: int, height: int) -> HObject

描述

erosion_rectangle1erosion_rectangle1ErosionRectangle1ErosionRectangle1ErosionRectangle1erosion_rectangle1 applies an erosion with a rectangular structuring element to the input regions 区域区域区域区域区域区域. The size of the structuring rectangle is WidthWidthWidthWidthwidthwidth x HeightHeightHeightHeightheightheight. The operator results in reduced regions, and the areas smaller than the rectangular mask are eliminated.

erosion_rectangle1erosion_rectangle1ErosionRectangle1ErosionRectangle1ErosionRectangle1erosion_rectangle1 is a very fast operation because the height of the rectangle enters only logarithmically into the runtime complexity, while the width does not enter at all. This leads to excellent runtime efficiency, even in the case of very large rectangles (edge length > 100).

Regions containing small connecting strips between large areas are separated only seemingly. They remain logically one region.

注意

To reduce a region by the same amount in all directions, WidthWidthWidthWidthwidthwidth and HeightHeightHeightHeightheightheight must be odd. If this is not the case, the region is eroded by a smaller amount at the right or at the bottom, respectively, than at the left or at the top.

运行信息

参数表

区域区域区域区域区域区域 (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Regions to be eroded.

RegionErosionRegionErosionRegionErosionRegionErosionregionErosionregion_erosion (output_object)  region(-array) objectHRegionHObjectHRegionHobject *

Eroded regions.

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

Width of the structuring rectangle.

Default: 11

Suggested values: 1, 2, 3, 4, 5, 11, 15, 21, 31, 51, 71, 101, 151, 201

Value range: 1 ≤ Width Width Width Width width width ≤ 511 (lin)

Minimum increment: 1

Recommended increment: 1

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

Height of the structuring rectangle.

Default: 11

Suggested values: 1, 2, 3, 4, 5, 11, 15, 21, 31, 51, 71, 101, 151, 201

Value range: 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:

结果

erosion_rectangle1erosion_rectangle1ErosionRectangle1ErosionRectangle1ErosionRectangle1erosion_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, watershedswatershedsWatershedsWatershedsWatershedswatersheds, class_ndim_normclass_ndim_normClassNdimNormClassNdimNormClassNdimNormclass_ndim_norm

可能的后置算子

reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape, area_centerarea_centerAreaCenterAreaCenterAreaCenterarea_center, connectionconnectionConnectionConnectionConnectionconnection

可替代算子

erosion1erosion1Erosion1Erosion1Erosion1erosion1, minkowski_sub1minkowski_sub1MinkowskiSub1MinkowskiSub1MinkowskiSub1minkowski_sub1

参考其它

gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1gen_rectangle1

模块

Foundation