pysteps.utils.images.morph_opening

Contents

pysteps.utils.images.morph_opening#

pysteps.utils.images.morph_opening(input_image, thr, n)#

Filter out small scale noise on the image by applying a binary morphological opening, that is, erosion followed by dilation.

Parameters:
  • input_image (ndarray or MaskedArray) – Array of shape (m, n) containing the input image.

  • thr (float) – The threshold used to convert the image into a binary image.

  • n (int) – The structuring element size [pixels].

Returns:

input_image – Array of shape (m,n) containing the filtered image.

Return type:

ndarray or MaskedArray