pysteps.nowcasts.utils.compute_dilated_mask

pysteps.nowcasts.utils.compute_dilated_mask#

pysteps.nowcasts.utils.compute_dilated_mask(input_mask, kr, r)#

Buffer the input rain mask using the given kernel. Add a grayscale rim for smooth rain/no-rain transition by iteratively dilating the mask.

Parameters:
  • input_mask (array_like) – Two-dimensional boolean array containing the input mask.

  • kr (array_like) – Structuring element for the dilation.

  • r (int) – The number of iterations for the dilation.

Returns:

out – The dilated mask normalized to the range [0,1].

Return type:

array_like