union1union1Union1Union1union1 (算子名称)
名称
union1union1Union1Union1union1 — Return the union of all input regions.
参数签名
def union1(区域: HObject) -> HObject
描述
union1union1Union1Union1Union1union1 computes the union of all input regions and
returns the result in RegionUnionRegionUnionRegionUnionRegionUnionregionUnionregion_union.
运行信息
- 多线程类型:可重入(与非独占操作符并行运行)。
- 多线程作用域:全局(可以从任何线程调用)。
- 未经并行化处理。
参数表
区域区域区域区域区域区域 (input_object) region-array → objectHRegionHObjectHRegionHobject
Regions of which the union is to be computed.
RegionUnionRegionUnionRegionUnionRegionUnionregionUnionregion_union (output_object) region → objectHRegionHObjectHRegionHobject *
Union of all input regions.
Number of elements:
RegionUnion <= Region
例程 (HDevelop)
* Union of segmentation results:
threshold(Image,Region1,128,255)
dyn_threshold(Image,Mean,Region2,5,'light')
concat_obj(Region1,Region2,Regions)
union1(Regions,RegionUnion)
例程 (C)
/* Union of segmentation results: */
threshold(Image,&Region1,128.0,255.0);
dyn_threshold(Image,Mean,&Region2,5.0,"light");
concat_obj(Region1,Region2,&Regions);
union1(Regions,&RegionUnion);
例程 (HDevelop)
* Union of segmentation results:
threshold(Image,Region1,128,255)
dyn_threshold(Image,Mean,Region2,5,'light')
concat_obj(Region1,Region2,Regions)
union1(Regions,RegionUnion)
例程 (HDevelop)
* Union of segmentation results:
threshold(Image,Region1,128,255)
dyn_threshold(Image,Mean,Region2,5,'light')
concat_obj(Region1,Region2,Regions)
union1(Regions,RegionUnion)
例程 (HDevelop)
* Union of segmentation results:
threshold(Image,Region1,128,255)
dyn_threshold(Image,Mean,Region2,5,'light')
concat_obj(Region1,Region2,Regions)
union1(Regions,RegionUnion)
Complexity
Let F be the sum of all areas of the input regions. Then the
runtime complexity is O(log(sqrt(F)) * sqrt(F)).
结果
union1union1Union1Union1Union1union1 always returns 2 (
H_MSG_TRUE)
. The behavior in case of
empty input (no regions given) can be set via
set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)
and the behavior in case of an empty input region via
set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)set_system("empty_region_result",<Result>).
如有必要,将引发异常。
可能的前置算子
thresholdthresholdThresholdThresholdThresholdthreshold,
connectionconnectionConnectionConnectionConnectionconnection,
regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing,
pouringpouringPouringPouringPouringpouring
可能的后置算子
select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape,
disp_regiondisp_regionDispRegionDispRegionDispRegiondisp_region
可替代算子
union2union2Union2Union2Union2union2
参考其它
intersectionintersectionIntersectionIntersectionIntersectionintersection,
complementcomplementComplementComplementComplementcomplement
模块
Foundation