Operator ERODE

Operator Library: Filter

The operator ERODE performs a binary erosion of the image, which can be used to separate touching objects. The input of the operator is a kernel image data stream. At the output the erosion result of the central pixel is provided. A structuring element for the erode operation is given by a parameterizable binary matrix StructElement. The matrix has the size of the input kernel. Erosion is a fundamental operation in morphological image processing. In erosion, the output is set to '1', if all matrix elements of value '1' match with their corresponding kernel elements. In other words, the kernel matrix has to fully fit into the image.

I/O Properties

Property Value
Operator Type O
Input Link I, kernel input
Output Link O, result output

Supported Link Format

Link Parameter Input Link I Output Link O
Bit Width 1 as I
Arithmetic unsigned as I
Parallelism any as I
Kernel Columns any as I
Kernel Rows any as I
Img Protocol {VALT_IMAGE2D, VALT_LINE1D, VALT_PIXEL0D} as I
Color Format VAF_GRAY as I
Color Flavor FL_NONE as I
Max. Img Width any as I
Max. Img Height any as I

Parameters

StructElement
Type static parameter
Default 1
Range {0, 1}

Structuring element is a shape, used to probe or interact with a given image, with the purpose of drawing conclusions on how this shape fits or misses the shapes in the image.

  • A '0' in the struct element has to match with a '0' in the respective kernel input.

  • A '1' in the struct element has to match with a '1' in the respective kernel input.

If the input kernel size of the operator is changed, the coefficients will also change. Check the coefficients after changing the input kernel size.

Examples of Use

The use of operator ERODE is shown in the following examples:

  • 'Morphological Edge'

    Examples - A binary eroded image is compared with the original. An edge is detected if both differ.

  • 'Close'

    Examples - Shows the implementation of a morphological close applied to binary images.

  • 'Open'

    Examples - Shows the implementation of a morphological open applied to binary images.