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

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