hit_or_miss hit_or_miss HitOrMiss HitOrMiss hit_or_miss (Operator)
Name
hit_or_miss hit_or_miss HitOrMiss HitOrMiss hit_or_miss
— Hit-or-miss operation for regions.
Signature
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 )
Description
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.
Execution Information
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Automatically parallelized on tuple level.
Parameters
Region Region Region Region region region
(input_object) region(-array) →
object HRegion HObject HRegion Hobject
Regions to be processed.
StructElement1 StructElement1 StructElement1 StructElement1 structElement1 struct_element_1
(input_object) region →
object HRegion HObject HRegion Hobject
Erosion mask for the input regions.
StructElement2 StructElement2 StructElement2 StructElement2 structElement2 struct_element_2
(input_object) region →
object HRegion HObject HRegion Hobject
Erosion mask for the complements of the input regions.
RegionHitMiss RegionHitMiss RegionHitMiss RegionHitMiss regionHitMiss region_hit_miss
(output_object) region(-array) →
object HRegion HObject HRegion Hobject *
Result of the hit-or-miss operation.
Row Row Row Row row row
(input_control) point.y →
HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Row coordinate of the reference point.
Default value: 16
Suggested values: 0, 16, 32, 128, 256
Typical range of values: 0
≤
Row
Row
Row
Row
row
row
≤
511
(lin)
Minimum increment: 1
Recommended increment: 1
Column Column Column Column column column
(input_control) point.x →
HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Column coordinate of the reference point.
Default value: 16
Suggested values: 0, 16, 32, 128, 256
Typical range of values: 0
≤
Column
Column
Column
Column
column
column
≤
511
(lin)
Minimum increment: 1
Recommended increment: 1
Complexity
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:
Result
hit_or_miss hit_or_miss HitOrMiss HitOrMiss HitOrMiss hit_or_miss
returns TRUE if all parameters are correct.
The behavior in case of empty or no input region can be set via:
no region:
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>)
empty region:
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>)
Otherwise, an exception is raised.
Possible Predecessors
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
Possible Successors
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
Alternatives
erosion2 erosion2 Erosion2 Erosion2 Erosion2 erosion2
,
dilation2 dilation2 Dilation2 Dilation2 Dilation2 dilation2
See also
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
Module
Foundation