cupyx.scipy.ndimage.binary_hit_or_miss#
- cupyx.scipy.ndimage.binary_hit_or_miss(input, structure1=None, structure2=None, output=None, origin1=0, origin2=None)[source]#
Multidimensional binary hit-or-miss transform.
The hit-or-miss transform finds the locations of a given pattern inside the input image.
- Parameters:
input (cupy.ndarray) – Binary image where a pattern is to be detected.
structure1 (cupy.ndarray, optional) – Part of the structuring element to be fitted to the foreground (non-zero elements) of
input
. If no value is provided, a structure of square connectivity 1 is chosen.structure2 (cupy.ndarray, optional) – Second part of the structuring element that has to miss completely the foreground. If no value is provided, the complementary of
structure1
is taken.output (cupy.ndarray, dtype or None, optional) – Array of the same shape as input, into which the output is placed. By default, a new array is created.
origin1 (int or tuple of ints, optional) – Placement of the first part of the structuring element
structure1
, by default 0 for a centered structure.origin2 (int or tuple of ints or None, optional) – Placement of the second part of the structuring element
structure2
, by default 0 for a centered structure. If a value is provided fororigin1
and not fororigin2
, thenorigin2
is set toorigin1
.
- Returns:
Hit-or-miss transform of
input
with the given structuring element (structure1
,structure2
).- Return type:
Warning
This function may synchronize the device.
See also