Herror ::union1 (
    Hobject Region,
    Hobject *RegionUnion
)
HRegion HRegionArray::Union1 (
    void
) const

Return the union of all input regions.

::union1 computes the union of all input regions and returns the result in RegionUnion.


Parameters

Region (input_object)
region-array -> Hobject: HRegionArray
Regions of which the union is to be computed.

RegionUnion (output_object)
region -> Hobject * : HRegion
Union of all input regions.
Number of elements: RegionUnion <= Region


Example
/* Union of segmentation results: */
threshold(Image,&Seg1,128.0,255.0);
dyn_threshold(Image,Mean,&Seg2,5.0,"light");
concat_obj(Seg1,Seg2,&H);
union1(H,&Seg);

Complexity

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


Result

::union1 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

::union2


See also

::intersection, ::complement


Module

Region processing



Copyright © 1996-2002 MVTec Software GmbH