patch_denoise.bindings.utils.compute_mask#
- patch_denoise.bindings.utils.compute_mask(array, convex=False)[source]#
Compute mask for array using the Otzu’s method.
The time axis is assumed to be the last one.
The mask is computed slice-wise on the time average of the array.
- Parameters:
array (numpy.ndarray) – Array to compute mask for.
convex (bool, default False) – If True, the mask is convex for each slice.
- Returns:
Mask for array.
- Return type: