hit_or_miss hit_or_miss HitOrMiss HitOrMiss hit_or_miss (算子)
名称
hit_or_miss hit_or_miss HitOrMiss HitOrMiss hit_or_miss — 区域的击中击不中操作。
签名
Herror hit_or_miss (const Hobject Region , const Hobject StructElement1 , const Hobject StructElement2 , Hobject* RegionHitMiss , const Hlong Row , const Hlong Column )
Herror T_hit_or_miss (const Hobject Region , const Hobject StructElement1 , const Hobject StructElement2 , Hobject* RegionHitMiss , const Htuple Row , const Htuple Column )
描述
hit_or_miss hit_or_miss HitOrMiss HitOrMiss HitOrMiss hit_or_miss performs the hit-or-miss-transformation.
First, an erosion with the structuring element
StructElement1 StructElement1 StructElement1 StructElement1 structElement1 struct_element_1 is done on the input region
Region Region Region Region region region . Then an erosion with the structuring element
StructElement2 StructElement2 StructElement2 StructElement2 structElement2 struct_element_2 is performed on the complement of the
input region. The intersection of the two resulting regions is the
result RegionHitMiss RegionHitMiss RegionHitMiss RegionHitMiss regionHitMiss region_hit_miss of hit_or_miss hit_or_miss HitOrMiss HitOrMiss HitOrMiss hit_or_miss .
The hit-or-miss-transformation selects precisely the points for
which the conditions given by the structuring elements
StructElement1 StructElement1 StructElement1 StructElement1 structElement1 struct_element_1 and StructElement2 StructElement2 StructElement2 StructElement2 structElement2 struct_element_2 are
fulfilled. StructElement1 StructElement1 StructElement1 StructElement1 structElement1 struct_element_1 determines the condition for
the foreground pixels, while StructElement2 StructElement2 StructElement2 StructElement2 structElement2 struct_element_2 determines
the condition for the background pixels. In order to obtain
sensible results, StructElement1 StructElement1 StructElement1 StructElement1 structElement1 struct_element_1 and
StructElement2 StructElement2 StructElement2 StructElement2 structElement2 struct_element_2 must fit like key and lock. In any case,
StructElement1 StructElement1 StructElement1 StructElement1 structElement1 struct_element_1 and StructElement2 StructElement2 StructElement2 StructElement2 structElement2 struct_element_2 must be
disjunct. Row Row Row Row row row and Column Column Column Column column column determine the
reference point of the structuring elements.
Structuring elements (StructElement1 StructElement1 StructElement1 StructElement1 structElement1 struct_element_1 ,
StructElement2 StructElement2 StructElement2 StructElement2 structElement2 struct_element_2 ) can be generated by calling operators
like gen_region_points gen_region_points GenRegionPoints GenRegionPoints GenRegionPoints gen_region_points , etc.
执行信息
多线程类型:可重入(与非独占算子并行运行)。
多线程作用域:全局(可从任何线程调用)。
在元组级别上自动并行化。
参数
Region Region Region Region region region (输入对象) region(-array) → object HRegion HObject HRegion Hobject
Regions to be processed.
StructElement1 StructElement1 StructElement1 StructElement1 structElement1 struct_element_1 (输入对象) region → object HRegion HObject HRegion Hobject
Erosion mask for the input regions.
StructElement2 StructElement2 StructElement2 StructElement2 structElement2 struct_element_2 (输入对象) region → object HRegion HObject HRegion Hobject
Erosion mask for the complements of the input regions.
RegionHitMiss RegionHitMiss RegionHitMiss RegionHitMiss regionHitMiss region_hit_miss (输出对象) region(-array) → object HRegion HObject HRegion Hobject *
Result of the hit-or-miss operation.
Row Row Row Row row row (输入控制) point.y → HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Row coordinate of the reference point.
默认值:
16
建议值:
0, 16, 32, 128, 256
值范围:
0
≤
Row
Row
Row
Row
row
row
≤
511 (lin)
最小增量:
1
建议增量:
1
Column Column Column Column column column (输入控制) point.x → HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Column coordinate of the reference point.
默认值:
16
建议值:
0, 16, 32, 128, 256
值范围:
0
≤
Column
Column
Column
Column
column
column
≤
511 (lin)
最小增量:
1
建议增量:
1
复杂度
Let F be the area of an input region, F1 the area of the
structuring element 1, and F2 the area of the structuring element
2. Then the runtime complexity for one object is:
结果
hit_or_miss hit_or_miss HitOrMiss HitOrMiss HitOrMiss hit_or_miss 在所有参数正确时返回 2 ( H_MSG_TRUE )。当输入区域为空或不存在时,其行为可通过以下方式设置:
无区域:
set_system('no_object_result',<RegionResult>) set_system("no_object_result",<RegionResult>) SetSystem("no_object_result",<RegionResult>) SetSystem("no_object_result",<RegionResult>) SetSystem("no_object_result",<RegionResult>) set_system("no_object_result",<RegionResult>)
空区域:
set_system('empty_region_result',<RegionResult>) set_system("empty_region_result",<RegionResult>) SetSystem("empty_region_result",<RegionResult>) SetSystem("empty_region_result",<RegionResult>) SetSystem("empty_region_result",<RegionResult>) set_system("empty_region_result",<RegionResult>)
否则,将抛出异常。
可能的前趋
threshold threshold Threshold Threshold Threshold threshold ,
regiongrowing regiongrowing Regiongrowing Regiongrowing Regiongrowing regiongrowing ,
connection connection Connection Connection Connection connection ,
union1 union1 Union1 Union1 Union1 union1 ,
watersheds watersheds Watersheds Watersheds Watersheds watersheds ,
class_ndim_norm class_ndim_norm ClassNdimNorm ClassNdimNorm ClassNdimNorm class_ndim_norm
可能的后继
difference difference Difference Difference Difference difference ,
reduce_domain reduce_domain ReduceDomain ReduceDomain ReduceDomain reduce_domain ,
select_shape select_shape SelectShape SelectShape SelectShape select_shape ,
area_center area_center AreaCenter AreaCenter AreaCenter area_center ,
connection connection Connection Connection Connection connection
替代
erosion2 erosion2 Erosion2 Erosion2 Erosion2 erosion2 ,
dilation2 dilation2 Dilation2 Dilation2 Dilation2 dilation2
另见
gen_region_points gen_region_points GenRegionPoints GenRegionPoints GenRegionPoints gen_region_points ,
gen_region_polygon_filled gen_region_polygon_filled GenRegionPolygonFilled GenRegionPolygonFilled GenRegionPolygonFilled gen_region_polygon_filled
模块
基础