cupyx.scipy.ndimage.minimum_filter#
- cupyx.scipy.ndimage.minimum_filter(input, size=None, footprint=None, output=None, mode='reflect', cval=0.0, origin=0, axes=None)[source]#
Multi-dimensional minimum filter.
- Parameters:
input (cupy.ndarray) – The input array.
size (int or sequence of int) – One of
size
orfootprint
must be provided. Iffootprint
is given,size
is ignored. Otherwisefootprint = cupy.ones(size)
withsize
automatically made to match the number of dimensions ininput
.footprint (cupy.ndarray) – a boolean array which specifies which of the elements within this shape will get passed to the filter function.
output (cupy.ndarray, dtype or None) – The array in which to place the output. Default is is same dtype as the input.
mode (str or sequence of str) – The array borders are handled according to the given mode (
'reflect'
,'constant'
,'nearest'
,'mirror'
,'wrap'
). Default is'reflect'
. By passing a sequence of modes with length equal to the number ofaxes
along which the input array is being filtered, different modes can be specified along each axis. For more details on the supported modes, seescipy.ndimage.minimum_filter()
.cval (scalar) – Value to fill past edges of input if mode is
'constant'
. Default is0.0
.origin (int or sequence of int) – The origin parameter controls the placement of the filter, relative to the center of the current element of the input. Default of 0 is equivalent to
(0,)*input.ndim
.axes (tuple of int or None) – If None,
input
is filtered along all axes. Otherwise,input
is filtered along the specified axes. Whenaxes
is specified, any tuples used forsize
,mode
and/ororigin
must match the length ofaxes
. The ith entry in any of these tuples corresponds to the ith entry inaxes
. Default isNone
.
- Returns:
The result of the filtering.
- Return type:
See also