hit_or_miss
— Hit-or-miss operation for regions.
hit_or_miss(Region, StructElement1, StructElement2 : RegionHitMiss : Row, Column : )
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.
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 value: 16
Suggested values: 0, 16, 32, 128, 256
Typical range of values: 0
≤
Row
≤
511
(lin)
Minimum increment: 1
Recommended increment: 1
Column
(input_control) point.x →
(integer)
Column coordinate of the reference point.
Default value: 16
Suggested values: 0, 16, 32, 128, 256
Typical range of values: 0
≤
Column
≤
511
(lin)
Minimum increment: 1
Recommended increment: 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
returns 2 (H_MSG_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>)
empty region: set_system('empty_region_result',<RegionResult>)
Otherwise, an exception is raised.
threshold
,
regiongrowing
,
connection
,
union1
,
watersheds
,
class_ndim_norm
difference
,
reduce_domain
,
select_shape
,
area_center
,
connection
gen_region_points
,
gen_region_polygon_filled
Foundation