@default_selem
@pad_for_eccentric_selems
def closing(image, selem=None, out=None):
 dilated = dilation(image, selem)
 out = erosion(dilated, selem, out=out, shift_x=True, shift_y=True)
 return out

@ default_selem @ pad_for_eccentric_selems def closing ( image , selem = None , out = None ) : dilated = dilation ( image , selem ) out = erosion ( dilated , selem , out = out , shift_x = True , shift_y = True ) return out
return greyscale morphological closing of an image .