Herror ::fill_up_shape (
    Hobject Region,
    Hobject *RegionFillUp,
    const HTuple &Feature,
    const HTuple &Min,
    const HTuple &Max
)
HRegion HRegion::FillUpShape (
    const HTuple &Feature,
    const HTuple &Min,
    const HTuple &Max
) const
HRegionArray HRegionArray::FillUpShape (
    const HTuple &Feature,
    const HTuple &Min,
    const HTuple &Max
) const

Fill up holes in regions having given shape features.

::fill_up_shape fills up those holes in the input region Region having given shape features. The parameter Feature determines the shape feature to be used, while Min and Max determine the range the shape feature has to lie in in order for the hole to be filled up.


Parameters

Region (input_object)
region(-array) -> Hobject: HRegion(Array)
Input region(s).

RegionFillUp (output_object)
region(-array) -> Hobject * : HRegion(Array)
Output region(s) with filled holes.

Feature (input_control)
string -> HTuple.char *
Shape feature used.
Default value: 'area'
List of values: 'area', 'compactness', 'convexity', 'anisometry', 'phi', 'ra', 'rb', 'inner_circle', 'outer_circle'

Min (input_control)
number -> HTuple.double / long
Minimum value for Feature.
Default value: 1.0
Suggested values: 0.0, 1.0, 10.0, 50.0, 100.0, 500.0, 1000.0, 10000.0
Typical range of values: 0.0 <= Min

Max (input_control)
number -> HTuple.double / long
Maximum value for Feature.
Default value: 100.0
Suggested values: 10.0, 50.0, 100.0, 500.0, 1000.0, 10000.0, 100000.0
Typical range of values: 0.0 <= Max


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

Result

::fill_up_shape returns 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 handling is raised.


Possible Predecessors

::threshold, ::connection, ::regiongrowing, ::pouring


Possible Successors

::select_shape, ::disp_region


Alternatives

::fill_up


See also

::select_shape, ::connection, ::area_center


Module

Region processing



Copyright © 1996-2002 MVTec Software GmbH