Grooper Help - Version 25.0
25.0.0017 2,127
  • Overview
  • Help Status

Dilate Erode

IP Command Grooper.IP

Applies a dilation (thickening) or erosion (thinning) filter to the image using a configurable mask and operation type.

Remarks

The DilateErode command performs morphological operations on images, allowing you to thicken (dilate) or thin (erode) features such as text, lines, or marks. These operations are essential for document cleanup, noise removal, and enhancing connectivity of features prior to OCR or data extraction.

How DilateErode Works

  • The operation is selected using the 'Operation' property, with options for dilation, erosion, opening, or closing.
  • The size and shape of the structuring element (mask) are controlled by the 'Factor' and 'Shape' properties.
  • Dilation expands feature pixels, filling gaps and connecting broken elements.
  • Erosion shrinks feature pixels, removing small specks and thinning lines.
  • Opening (erode then dilate) removes small objects while preserving shape.
  • Closing (dilate then erode) fills small holes and connects nearby features.

Dilation Example:

DocumentDocument

Erosion Example:

DocumentDocument

Supported Pixel Formats

DilateErode supports all basic pixel formats, including Pixel8bppGrayscale and Pixel24bppBgr. Binary images are automatically converted to grayscale for processing.

Diagnostics Generated

This command does not generate additional diagnostic images or logs by default. Use before-and-after image comparison to evaluate the effect of different settings.

Configuration Guidance

  • Use dilation to connect broken text or lines, or to fill small gaps.
  • Use erosion to remove specks, thin lines, or separate touching features.
  • Adjust 'Factor' to control the size of the effect; higher values use a larger mask.
  • Select 'Shape' to target specific directions (e.g., horizontal, vertical) or use a square for general use.

Example:
To remove small specks from a scanned form, set 'Operation' to Erode, 'Factor' to 1, and 'Shape' to Square.

Properties

NameTypeDescription
General
Command Info

Used By

Notification