fittingfittingFittingFittingfitting (算子)

名称

fittingfittingFittingFittingfitting — 在具有多个结构元素的开后执行闭。

警告

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

签名

fitting(Region, StructElements : RegionFitted : : )

Herror fitting(const Hobject Region, const Hobject StructElements, Hobject* RegionFitted)

Herror T_fitting(const Hobject Region, const Hobject StructElements, Hobject* RegionFitted)

void Fitting(const HObject& Region, const HObject& StructElements, HObject* RegionFitted)

HRegion HRegion::Fitting(const HRegion& StructElements) const

static void HOperatorSet.Fitting(HObject region, HObject structElements, out HObject regionFitted)

HRegion HRegion.Fitting(HRegion structElements)

def fitting(region: HObject, struct_elements: HObject) -> HObject

描述

fittingfittingFittingFittingFittingfitting performs an openingopeningOpeningOpeningOpeningopening and a closingclosingClosingClosingClosingclosing successively on the input regions. The eight structuring elements normally used for this operation can be generated with the operator gen_struct_elementsgen_struct_elementsGenStructElementsGenStructElementsGenStructElementsgen_struct_elements。However, other user-defined structuring elements can also be used. Let R be the input region(s) and let denote the structuring elements. Furthermore, let P be the result of the opening and Q be the final result. Then the operator can be formalized as follows: Regions larger than the structuring elements are preserved, while small gaps are closed.

执行信息

参数

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

Regions to be processed.

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

Structuring elements.

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

Fitted regions.

结果

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

否则,将抛出异常。

可能的前趋

gen_struct_elementsgen_struct_elementsGenStructElementsGenStructElementsGenStructElementsgen_struct_elements, gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPointsgen_region_points

可能的后继

reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape, area_centerarea_centerAreaCenterAreaCenterAreaCenterarea_center, connectionconnectionConnectionConnectionConnectionconnection

替代

openingopeningOpeningOpeningOpeningopening, closingclosingClosingClosingClosingclosing, connectionconnectionConnectionConnectionConnectionconnection, select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape

模块

基础