fill_up_shapefill_up_shapeFillUpShapeFillUpShapefill_up_shape(算子)

名称

fill_up_shapefill_up_shapeFillUpShapeFillUpShapefill_up_shape — 填充具有给定形状特征的区域中的孔。

签名

fill_up_shape(Region : RegionFillUp : Feature, Min, Max : )

Herror fill_up_shape(const Hobject Region, Hobject* RegionFillUp, const char* Feature, double Min, double Max)

Herror T_fill_up_shape(const Hobject Region, Hobject* RegionFillUp, const Htuple Feature, const Htuple Min, const Htuple Max)

void FillUpShape(const HObject& Region, HObject* RegionFillUp, const HTuple& Feature, const HTuple& Min, const HTuple& Max)

HRegion HRegion::FillUpShape(const HString& Feature, const HTuple& Min, const HTuple& Max) const

HRegion HRegion::FillUpShape(const HString& Feature, double Min, double Max) const

HRegion HRegion::FillUpShape(const char* Feature, double Min, double Max) const

HRegion HRegion::FillUpShape(const wchar_t* Feature, double Min, double Max) const   ( Windows only)

static void HOperatorSet.FillUpShape(HObject region, out HObject regionFillUp, HTuple feature, HTuple min, HTuple max)

HRegion HRegion.FillUpShape(string feature, HTuple min, HTuple max)

HRegion HRegion.FillUpShape(string feature, double min, double max)

def fill_up_shape(region: HObject, feature: str, min: Union[int, float], max: Union[int, float]) -> HObject

描述

fill_up_shapefill_up_shapeFillUpShapeFillUpShapeFillUpShapefill_up_shape fills up those holes in the input region RegionRegionRegionRegionregionregion having given shape features. The parameter FeatureFeatureFeatureFeaturefeaturefeature determines the shape feature to be used, while MinMinMinMinminminMaxMaxMaxMaxmaxmax determine the range the shape feature has to lie in in order for the hole to be filled up.

执行信息

参数

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

Input region(s).

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

Output region(s) with filled holes.

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

Shape feature used.

默认值: 'area' "area" "area" "area" "area" "area"

值列表: 'anisometry'"anisometry""anisometry""anisometry""anisometry""anisometry", 'area'"area""area""area""area""area", 'compactness'"compactness""compactness""compactness""compactness""compactness", 'convexity'"convexity""convexity""convexity""convexity""convexity", 'inner_circle'"inner_circle""inner_circle""inner_circle""inner_circle""inner_circle", 'outer_circle'"outer_circle""outer_circle""outer_circle""outer_circle""outer_circle", 'phi'"phi""phi""phi""phi""phi", 'ra'"ra""ra""ra""ra""ra", 'rb'"rb""rb""rb""rb""rb"

MinMinMinMinminmin (输入控制)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Minimum value for Feature.

默认值: 1.0

建议值: 0.0, 1.0, 10.0, 50.0, 100.0, 500.0, 1000.0, 10000.0

值范围: 0.0 ≤ Min Min Min Min min min

MaxMaxMaxMaxmaxmax (输入控制)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Maximum value for Feature.

默认值: 100.0

建议值: 10.0, 50.0, 100.0, 500.0, 1000.0, 10000.0, 100000.0

值范围: 0.0 ≤ Max Max Max Max max max

示例(C)

read_image(&Image,"monkey");
threshold(Image,&Seg,120.0,255.0);
fill_up_shape(Seg,&Filled,"area",0.0,200.0);

结果

fill_up_shapefill_up_shapeFillUpShapeFillUpShapeFillUpShapefill_up_shape 在所有参数正确时返回 2 (H_MSG_TRUE)。当输入为空(未指定区域)时,可设置行为通过算子 set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>),以及输入区域为空时,可设置行为通过算子 set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)set_system("empty_region_result",<Result>)。如有必要,则抛出异常。

可能的前趋

thresholdthresholdThresholdThresholdThresholdthreshold, connectionconnectionConnectionConnectionConnectionconnection, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, pouringpouringPouringPouringPouringpouring

可能的后继

select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape, disp_regiondisp_regionDispRegionDispRegionDispRegiondisp_region

替代

fill_upfill_upFillUpFillUpFillUpfill_up

另见

select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape, connectionconnectionConnectionConnectionConnectionconnection, area_centerarea_centerAreaCenterAreaCenterAreaCenterarea_center

模块

基础