Operator Reference
hit_or_miss (Operator)
hit_or_miss
— Hit-or-miss operation for regions.
Signature
hit_or_miss(Region, StructElement1, StructElement2 : RegionHitMiss : Row, Column : )
Description
hit_or_miss
performs the hit-or-miss-transformation.
First, an erosion with the structuring element
StructElement1
is done on the input region
Region
. Then an erosion with the structuring element
StructElement2
is performed on the complement of the
input region. The intersection of the two resulting regions is the
result RegionHitMiss
of hit_or_miss
.
The hit-or-miss-transformation selects precisely the points for
which the conditions given by the structuring elements
StructElement1
and StructElement2
are
fulfilled. StructElement1
determines the condition for
the foreground pixels, while StructElement2
determines
the condition for the background pixels. In order to obtain
sensible results, StructElement1
and
StructElement2
must fit like key and lock. In any case,
StructElement1
and StructElement2
must be
disjunct. Row
and Column
determine the
reference point of the structuring elements.
Structuring elements (StructElement1
,
StructElement2
) can be generated by calling operators
like 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
(input_object) region(-array) →
object
Regions to be processed.
StructElement1
(input_object) region →
object
Erosion mask for the input regions.
StructElement2
(input_object) region →
object
Erosion mask for the complements of the input regions.
RegionHitMiss
(output_object) region(-array) →
object
Result of the hit-or-miss operation.
Row
(input_control) point.y →
(integer)
Row coordinate of the reference point.
Default: 16
Suggested values: 0, 16, 32, 128, 256
Value range:
0
≤
Row
≤
511
(lin)
Minimum increment: 1
Recommended increment: 1
Column
(input_control) point.x →
(integer)
Column coordinate of the reference point.
Default: 16
Suggested values: 0, 16, 32, 128, 256
Value range:
0
≤
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
returns 2 (
H_MSG_TRUE)
if all parameters are correct.
The behavior in case of empty or no input region can be set via:
-
empty region:
set_system('empty_region_result',<RegionResult>)
Otherwise, an exception is raised.
Possible Predecessors
threshold
,
regiongrowing
,
connection
,
union1
,
watersheds
,
class_ndim_norm
Possible Successors
difference
,
reduce_domain
,
select_shape
,
area_center
,
connection
Alternatives
See also
gen_region_points
,
gen_region_polygon_filled
Module
Foundation