Herror ::union2 (
    Hobject Region1,
    Hobject Region2,
    Hobject *RegionUnion
)
HRegion HRegion::Union2 (
    const HRegionArray &Region2
) const
HRegionArray HRegionArray::Union2 (
    const HRegionArray &Region2
) const

Return the union of two regions.

::union2 computes the union of the region in Region1 with all regions in Region2. This means that ::union2 is not commutative!


Parameters

Region1 (input_object)
region(-array) -> Hobject: HRegion(Array)
Region for which the union with all regions in Region2 is to be computed.

Region2 (input_object)
region(-array) -> Hobject: HRegion(Array)
Regions which should be added to Region1.

RegionUnion (output_object)
region(-array) -> Hobject * : HRegion(Array)
Resulting regions.
Number of elements: RegionUnion == Region1


Complexity

Let F be the sum of all areas of the input regions. Then the runtime complexity is O(F) * F).


Result

::union2 always returns H_MSG_TRUE. 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

::union1


See also

::intersection, ::complement


Module

Region processing



Copyright © 1996-2002 MVTec Software GmbH