Skip to content

fill_up_shapeFillUpShapeFillUpShapefill_up_shapefill_up_shape🔗

Short description🔗

fill_up_shapeFillUpShapeFillUpShapefill_up_shapefill_up_shape — Fill up holes in regions having given shape features.

Signature🔗

fill_up_shape( region Region, out region RegionFillUp, string Feature, number Min, number Max )void FillUpShape( const HObject& Region, HObject* RegionFillUp, const HTuple& Feature, const HTuple& Min, const HTuple& Max )static void HOperatorSet.FillUpShape( HObject region, out HObject regionFillUp, HTuple feature, HTuple min, HTuple max )def fill_up_shape( region: HObject, feature: str, min: Union[int, float], max: Union[int, float] ) -> HObject

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 )

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)

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

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

Description🔗

fill_up_shapeFillUpShape fills up those holes in the input region Regionregionregion having given shape features. The parameter Featurefeaturefeature determines the shape feature to be used, while Minminmin and Maxmaxmax determine the range the shape feature has to lie in in order for the hole to be filled up.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on tuple level.

Parameters🔗

Regionregionregion (input_object) region(-array) → objectHObjectHRegionHObjectHobject

Input region(s).

RegionFillUpregionFillUpregion_fill_up (output_object) region(-array) → objectHObjectHRegionHObjectHobject *

Output region(s) with filled holes.

Featurefeaturefeature (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Shape feature used.

Default: 'area'"area"
List of values: 'anisometry', 'area', 'compactness', 'convexity', 'inner_circle', 'outer_circle', 'phi', 'ra', 'rb'"anisometry", "area", "compactness", "convexity", "inner_circle", "outer_circle", "phi", "ra", "rb"

Minminmin (input_control) number → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Minimum value for Feature.

Default: 1.01.0
Suggested values: 0.0, 1.0, 10.0, 50.0, 100.0, 500.0, 1000.0, 10000.00.0, 1.0, 10.0, 50.0, 100.0, 500.0, 1000.0, 10000.0
Value range: 0.0 ≤ Min

Maxmaxmax (input_control) number → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Maximum value for Feature.

Default: 100.0100.0
Suggested values: 10.0, 50.0, 100.0, 500.0, 1000.0, 10000.0, 100000.010.0, 50.0, 100.0, 500.0, 1000.0, 10000.0, 100000.0
Value range: 0.0 ≤ Max

Example🔗

(C)

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

Result🔗

fill_up_shapeFillUpShape returns 2 (H_MSG_TRUE) if all parameters are correct. The behavior in case of empty input (no regions given) can be set via set_system('no_object_result',<Result>) and the behavior in case of an empty input region via set_system('empty_region_result',<Result>). If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

thresholdThreshold, connectionConnection, regiongrowingRegiongrowing, pouringPouring

Possible successors

select_shapeSelectShape, disp_regionDispRegion

Alternatives

fill_upFillUp

See also

select_shapeSelectShape, connectionConnection, area_centerAreaCenter

Module🔗

Foundation