Herror ::select_shape_std (
    Hobject Regions,
    Hobject *SelectedRegions,
    const HTuple &Shape,
    const HTuple &Percent
)
HRegion HRegion::SelectShapeStd (
    const HTuple &Shape,
    const HTuple &Percent
) const
HRegionArray HRegionArray::SelectShapeStd (
    const HTuple &Shape,
    const HTuple &Percent
) const

Select regions of a given shape.

The operator ::select_shape_std compares the shape of the given regions with default shapes. If the region has a similar shape it is adopted into the output. Possible values for Shape are:

'max_area'      The largest region is selected.

'rectangle1'    The surrounding rectangle parallel to the coordinate axes is 
                determined via the operator ::smallest_rectangle1. If 
                the area difference in percent is larger than Percent 
                the region is adopted.

'rectangle2'    The smallest surrounding rectangle with any orientation is 
                determined via the operator ::smallest_rectangle2. If 
                the area difference in percent is larger than Percent 
                the region is adopted.


Parameters

Regions (input_object)
region(-array) -> Hobject: HRegion(Array)
Input regions to be selected.

SelectedRegions (output_object)
region(-array) -> Hobject * : HRegion(Array)
Regions with desired shape.

Shape (input_control)
string -> HTuple.char *
Shape features to be checked.
Default value: 'max_area'
List of values: 'max_area', 'rectangle1', 'rectangle2'

Percent (input_control)
real -> HTuple.double
Similarity measure.
Default value: 70.0
Suggested values: 10.0, 30.0, 50.0, 60.0, 70.0, 80.0, 90.0, 95.0, 100.0
Typical range of values: 0.0 <= Percent <= 100.0 (lin)
Minimum increment: 0.1
Recommended increment: 10.0


Possible Predecessors

::threshold, ::regiongrowing, ::connection, ::smallest_rectangle1, ::smallest_rectangle2


Alternatives

::intersection, ::complement, ::area_center


See also

::smallest_rectangle1, ::smallest_rectangle2


Module

Region processing



Copyright © 1996-2002 MVTec Software GmbH