bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / morphology / isotropic / isotropic_opening
function
skimage.morphology.isotropic:isotropic_opening
source: /dev/scikit-image/src/skimage/morphology/isotropic.py :145
Signature
def isotropic_opening ( image , radius , out = None , spacing = None ) Summary
Return binary morphological opening of an image.
Extended Summary
Compared to the more general skimage.morphology.opening, this function only supports binary inputs and circular footprints. However, it performs typically faster for large (circular) footprints. This works by thresholding the exact Euclidean distance map [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
opened: ndarray of boolThe result of the morphological opening.
Examples
Remove connection between two bright regionsimport numpy as np import skimage as ski image = np.array([[1, 0, 0, 0, 1], [1, 1, 0, 1, 1], [1, 1, 1, 1, 1], [1, 1, 0, 1, 1], [1, 0, 0, 0, 1]], dtype=bool) result = ski.morphology.isotropic_opening(image, radius=1) result.view(np.uint8)✓
Aliases
-
skimage.morphology.isotropic_opening