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

Shape Removal

Feature Dropout Grooper.IP

Detects and removes regions of an image which match one or more trained image templates.

Remarks

The Shape Removal command is used to automatically detect and remove regions of an image that match one or more trained image templates. This is especially useful for removing seals, logos, stamps, watermarks, or other arbitrary shapes that may interfere with OCR, data extraction, or document presentation.

Shape Removal leverages the Shape Detection command to locate visual elements in the input image that are similar to provided sample images. Once a match is found, the region is extracted, optionally dilated, and removed from the image using a mask-based dropout approach.

How Shape Removal Works

  1. The input image is analyzed using the settings in the 'Detection Settings' property, which controls how shapes are detected and matched.
  2. If a match is found, the corresponding region is extracted and a mask is generated.
  3. The mask is optionally dilated by the amount specified in the 'Dilation Factor' property to account for small variations between the template and the input image.
  4. The mask is applied to the image, removing or suppressing the detected shape(s).

Configuration and Usage

  • Use 'Detection Settings' to configure which shapes to detect, how strictly to match, and which sample images to use as templates.
  • Adjust 'Binarization' to ensure that the shape to be removed is clearly visible in the binarized image.
  • Set 'Dilation Factor' to control how much the detected shape region is expanded before removal.
  • Review the Shape Mask and Binarized diagnostic images to verify that only the intended shapes are being removed.

Supported Pixel Formats

  • Pixel8bppGrayscale
  • Pixel24bppBgr
  • Pixel1bppIndexed

Images are automatically converted as needed for processing.

Diagnostics

When run in diagnostic mode, Shape Removal generates several diagnostic images and logs to assist with configuration:

  • Shape Mask: Shows the mask generated for each detected shape, overlaid on the image.
  • Binarized: Displays the binarized version of the input image, useful for tuning binarization settings.
  • Log Messages: Reports detected shapes, mask generation, and processing steps.

Use these diagnostics to fine-tune detection parameters and ensure that only the intended shapes are removed.

Notes

  • Overly broad settings may remove non-shape content or miss small shapes.
  • Always review diagnostic output to avoid unintentional data loss.
  • Shape Removal does not generate classification features directly, but the results can impact downstream OCR and extraction.

Properties

NameTypeDescription
General
Command Info

See Also

Used By

Notification