diff --git a/skimage/morphology/grey.py b/skimage/morphology/grey.py index 19a4a346..cd3dcaa8 100644 --- a/skimage/morphology/grey.py +++ b/skimage/morphology/grey.py @@ -8,6 +8,7 @@ from . import cmorph __all__ = ['erosion', 'dilation', 'opening', 'closing', 'white_tophat', 'black_tophat'] + @default_fallback def erosion(image, selem=None, out=None, shift_x=False, shift_y=False): """Return greyscale morphological erosion of an image. @@ -35,6 +36,12 @@ def erosion(image, selem=None, out=None, shift_x=False, shift_y=False): eroded : uint8 array The result of the morphological erosion. + Notes + ----- + For `uint8` (and `uint16` up to a certain bit-depth) data, the lower + algorithm complexity makes the `skimage.filter.rank.minimum` function more + efficient for larger images and structuring elements. + Examples -------- >>> # Erosion shrinks bright regions @@ -90,6 +97,12 @@ def dilation(image, selem=None, out=None, shift_x=False, shift_y=False): dilated : uint8 array The result of the morphological dilation. + Notes + ----- + For `uint8` (and `uint16` up to a certain bit-depth) data, the lower + algorithm complexity makes the `skimage.filter.rank.maximum` function more + efficient for larger images and structuring elements. + Examples -------- >>> # Dilation enlarges bright regions