spatial_relation — 区域相对于坐标轴的姿态关系。
spatial_relation(Regions1, Regions2 : : Percent : RegionIndex1, RegionIndex2, Relation1, Relation2)
算子 spatial_relation selects regions located by
Percent percent “left”, “right”, “above” or “below”
other regions.
Regions1 and Regions2 contain the regions
to be compared.
Regions1 can have three states:
Regions1 contains an empty object tuple,
i.e., count_obj returns 0:
In this case all regions in Regions2
are permutatively checked for neighborhood.
Regions1 consists of one region:
The regions of Regions1 are compared to all regions
in Regions2。
Regions1 consists of the same number of regions
as Regions2:
Regions1 and Regions2 are checked
for a neighboring relation.
The percentage Percent is interpreted in such a way that
the area of the second region has to be located really left/right
or above/below the region margins of the first region by at least
Percent percent.
The indices of the regions that fulfill at least one of these
conditions are then located at the n-th position in the output parameters
RegionIndex1 and RegionIndex2.
Additionally the output parameters Relation1 and
Relation2 contain at the n-th position the type of relation of the
region pair (RegionIndex1[n], RegionIndex2[n]),
i.e., region with index RegionIndex2[n] has the relation
Relation1[n] and Relation2[n] with region with
index RegionIndex1[n].
Possible values for Relation1 and Relation2 are:
In RegionIndex1 and RegionIndex2 the indices of the
regions in the tuples of the input regions (Regions1 or
Regions2), respectively, are entered as image identifiers.
Access to chosen regions via the index can be obtained by the operator
copy_obj。
Regions1 (输入对象) region(-array) → object
Starting regions.
Regions2 (输入对象) region(-array) → object
Comparative regions.
Percent (输入控制) integer → (integer)
Percentage of the area of the comparative region which must be located left/right or above/below the region margins of the starting region.
默认值: 50
建议值: 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100
值范围:
0
≤
Percent
≤
100 (lin)
最小增量: 1
建议增量: 10
RegionIndex1 (输出控制) integer-array → (integer)
Indices of the regions in the tuple of the input regions which fulfill the pose relation.
RegionIndex2 (输出控制) integer-array → (integer)
Indices of the regions in the tuple of the input regions which fulfill the pose relation.
Relation1 (输出控制) string-array → (string)
Horizontal pose relation in which
RegionIndex2[n] stands with
RegionIndex1[n].
Relation2 (输出控制) string-array → (string)
Vertical pose relation in which RegionIndex2[n]
stands with RegionIndex1[n].
算子 spatial_relation 返回值 2 (
H_MSG_TRUE)
if
Regions2 is not empty and Percent is correctly
chosen. The behavior in case of empty parameter Regions2
(no input regions available) is set via the operator
set_system('no_object_result',<Result>)。空区域(区域是空集)的情况下的可设置行为通过
set_system('empty_region_result',<Result>)。如有必要,则抛出异常。
threshold,
regiongrowing,
connection
select_region_spatial,
find_neighbors,
copy_obj,
obj_to_integer
基础