openalea.eartrack.binarisation.erode_dilate

openalea.eartrack.binarisation.erode_dilate(binary_image, kernel_shape=(3, 3), iterations=1, mask=None)[source]

Applied a morphology (erode & dilate) on binary_image on mask ROI.

Parameters:
  • binary_image (numpy.ndarray) – 2-D array
  • kernel_shape ((N, M) of integers, optional) – kernel shape of (erode & dilate) applied to binary_image
  • iterations (int, optional) – number of successive iteration of (erode & dilate)
  • mask (numpy.ndarray, optional) – Array of same shape as image. Only points at which mask == True will be processed.
Returns:

out – Binary Image

Return type:

numpy.ndarray