bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / morphology / isotropic / isotropic_closing
function
skimage.morphology.isotropic:isotropic_closing
source: /dev/scikit-image/src/skimage/morphology/isotropic.py :211
Signature
def isotropic_closing ( image , radius , out = None , spacing = None ) Summary
Return binary morphological closing of an image.
Extended Summary
Compared to the more general skimage.morphology.closing, 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
closed: ndarray of boolThe result of the morphological closing.
Examples
Close gap between two bright linesimport numpy as np import skimage as ski image = np.array([[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [1, 1, 0, 1, 1], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]], dtype=bool) result = ski.morphology.isotropic_closing(image, radius=1) result.view(np.uint8)✓
Aliases
-
skimage.morphology.isotropic_closing