sksurgeryimage.processing.morphological_operators module

Functions to support morphological operators.

In many cases, these will just be convenience wrappers around OpenCV functions.

sksurgeryimage.processing.morphological_operators.dilate_with_cross(src, dst=None, size=3, iterations=1)[source]

Dilates an image with a cross element. OpenCV supports both grey scale and RGB erosion.

Parameters:
  • src – source image
  • dst – if provided, an image of the same size as src
  • size – size of structuring element
  • iterations – number of iterations
Returns:

the eroded image

sksurgeryimage.processing.morphological_operators.erode_with_cross(src, dst=None, size=3, iterations=1)[source]

Erodes an image with a cross element. OpenCV supports both grey scale and RGB erosion.

Parameters:
  • src – source image
  • dst – if provided, an image of the same size as src
  • size – size of structuring element
  • iterations – number of iterations
Returns:

the eroded image