denoise#
- denoise(mask: ndarray, diameter: int) ndarray [source]#
Apply morphological opening /w circular kernel to remove hi-freq noise.
- Parameters
mask (np.ndarray) – The binary mask to remove noise from.
diameter (int) – Size in pixels of the diameter of the circular kernel that will be used for the morphological op.
- Returns
The mask after applying denoising.
- Return type
np.ndarray