delta.data.postprocess

delta.data.postprocess(images: ndarray[Any, dtype[float32]], square_size: int = 5, min_size: Optional[float] = None, crop: bool = False) ndarray[Any, dtype[float32]]

A generic binary image cleaning function based on mathematical morphology.

Parameters
images2D or 3D numpy array

Input image or images stacked along axis=0.

square_sizeint, optional

Size of the square structuring element to use for morphological opening The default is 5.

min_sizefloat or None, optional

Remove objects smaller than this minimum area value. If None, the operation is not performed. The default is None.

Returns
images2D or 3D numpy array

Cleaned, binarized images. Note that the dimensions are squeezed before return (see numpy.squeeze doc)