closing_golayclosing_golayClosingGolayClosingGolayclosing_golay闭戈莱(算子)

名称

closing_golayclosing_golayClosingGolayClosingGolayclosing_golay — 用戈莱(Golay)字母表中的元素关闭一个区域。

警告

closing_golayclosing_golayClosingGolayClosingGolayClosingGolayclosing_golay 已过时,仅出于向后兼容性考虑而保留。

签名

closing_golay(Region : RegionClosing : GolayElement, Rotation : )

Herror closing_golay(const Hobject Region, Hobject* RegionClosing, const char* GolayElement, const Hlong Rotation)

Herror T_closing_golay(const Hobject Region, Hobject* RegionClosing, const Htuple GolayElement, const Htuple Rotation)

void ClosingGolay(const HObject& Region, HObject* RegionClosing, const HTuple& GolayElement, const HTuple& Rotation)

HRegion HRegion::ClosingGolay(const HString& GolayElement, Hlong Rotation) const

HRegion HRegion::ClosingGolay(const char* GolayElement, Hlong Rotation) const

HRegion HRegion::ClosingGolay(const wchar_t* GolayElement, Hlong Rotation) const   ( Windows only)

static void HOperatorSet.ClosingGolay(HObject region, out HObject regionClosing, HTuple golayElement, HTuple rotation)

HRegion HRegion.ClosingGolay(string golayElement, int rotation)

def closing_golay(region: HObject, golay_element: str, rotation: int) -> HObject

描述

closing_golayclosing_golayClosingGolayClosingGolayClosingGolayclosing_golay 被定义为先执行明可夫斯基加法,再执行明可夫斯基减法。首先计算输入区域(RegionRegionRegionRegionregionregion)与由 GolayElementGolayElementGolayElementGolayElementgolayElementgolay_elementRotationRotationRotationRotationrotationrotation 定义的 Golay 字母表中结构元素的明可夫斯基加法结果。随后对该结果与旋转 180 度的结构元素执行明可夫斯基减法。

以下结构化元素可用:

'l', 'm', 'd', 'c', 'e', 'i', 'f', 'f2', 'h', 'k'。

旋转数 RotationRotationRotationRotationrotationrotation 决定应使用元素的哪个旋转版本,以及应使用所选元素的前景(偶数)版本还是背景(奇数)版本。Golay 元素及其所有可能的旋转均由算子 golay_elementsgolay_elementsGolayElementsGolayElementsGolayElementsgolay_elements 描述。

closing_golayclosing_golayClosingGolayClosingGolayClosingGolayclosing_golay 用于闭合小于结构单元的孔洞,并平滑区域边界。

注意

并非所有 RotationRotationRotationRotationrotationrotation 值都适用于任意 Golay 元素。对于某些 RotationRotationRotationRotationrotationrotation 值,生成的区域与输入区域完全相同。

执行信息

参数

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

待关闭的区域。

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

关闭区域。

GolayElementGolayElementGolayElementGolayElementgolayElementgolay_element (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Golay 字母表中的结构元素。

默认值: 'h' "h" "h" "h" "h" "h"

值列表: 'c'"c""c""c""c""c", 'd'"d""d""d""d""d", 'e'"e""e""e""e""e", 'f'"f""f""f""f""f", 'f2'"f2""f2""f2""f2""f2", 'h'"h""h""h""h""h", 'i'"i""i""i""i""i", 'k'"k""k""k""k""k", 'l'"l""l""l""l""l", 'm'"m""m""m""m""m"

RotationRotationRotationRotationrotationrotation (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Golay 元素的旋转。根据元素的不同,并非所有旋转都是有效的。

默认值: 0

值列表: 0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 15

复杂度

设 F 为输入区域的面积。则单个区域的运行时间复杂度为:

结果

closing_golayclosing_golayClosingGolayClosingGolayClosingGolayclosing_golay 在所有参数正确时返回 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

另见

erosion_golayerosion_golayErosionGolayErosionGolayErosionGolayerosion_golay, dilation_golaydilation_golayDilationGolayDilationGolayDilationGolaydilation_golay, opening_golayopening_golayOpeningGolayOpeningGolayOpeningGolayopening_golay, hit_or_miss_golayhit_or_miss_golayHitOrMissGolayHitOrMissGolayHitOrMissGolayhit_or_miss_golay, thinning_golaythinning_golayThinningGolayThinningGolayThinningGolaythinning_golay, thickening_golaythickening_golayThickeningGolayThickeningGolayThickeningGolaythickening_golay, golay_elementsgolay_elementsGolayElementsGolayElementsGolayElementsgolay_elements

模块

基础