bundles / skimage latest / skimage / morphology / isotropic / isotropic_dilation
function
skimage.morphology.isotropic:isotropic_dilation
source: /dev/scikit-image/src/skimage/morphology/isotropic.py :77
Signature
def isotropic_dilation ( image , radius , out = None , spacing = None ) Summary
Return binary morphological dilation of an image.
Extended Summary
Compared to the more general skimage.morphology.dilation, this function only supports binary inputs and circular footprints. However, it performs typically faster for large (circular) footprints. This works by applying a threshold to the exact Euclidean distance map of the inverted image [1], [2]. The implementation is based on: func:scipy.ndimage.distance_transform_edt.
Parameters
image: ndarrayBinary input image.
radius: floatThe radius of the footprint used for the operation.
out: ndarray of bool, optionalThe array to store the result of the morphology. If None is passed, a new array will be allocated.
spacing: float, or sequence of float, optionalSpacing of elements along each dimension. If a sequence, must be of length equal to the input's dimension (number of axes). If a single number, this value is used for all axes. If not specified, a grid spacing of unity is implied.
Returns
dilated: ndarray of boolThe result of the morphological dilation with values in
[False, True].
Examples
Dilation enlarges bright regionsimport numpy as np import skimage as ski image = np.array([[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 1, 1, 0], [0, 0, 0, 0, 0]], dtype=bool) result = ski.morphology.isotropic_dilation(image, radius=1) result.view(np.uint8)✓
Aliases
-
skimage.morphology.isotropic_dilation