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

Negative Region Removal

IP Command Grooper.IP

Detects negated regions in an image and either inverts or removes them.

Remarks

The Negative Region Removal command is designed to identify and process "negated" (reverse video) regions in document images, where the background is dark and the foreground (typically text) is light. This is common in field labels, section headers, table headers, or other highlighted areas. By detecting and inverting these regions, or removing them entirely, this command improves OCR accuracy and downstream data extraction by ensuring text within these regions is readable.

Negated regions are detected using a combination of binarization, morphological analysis, and region validation. The command can be configured to leave an outline, remove the region completely, or simply invert the detected area. The output image will have negated regions processed according to your configuration, while the rest of the content is preserved.

Example of an inverted region:

NegatedNormalNegatedNormalNormalOriginalInvertDropout

NOTE: For best results, ensure that images are properly deskewed before applying this command.

How Negative Region Removal Works

  1. The input image is binarized using the settings in the 'Binarization Settings' property, separating dark and light regions.
  2. Morphological operations and region analysis are used to identify candidate negated regions based on size, area, and fill.
  3. Optional edge repair and filling are performed to ensure regions are solid and well-defined.
  4. Validated regions are either inverted, outlined, or removed, depending on the 'Outline Thickness' property.
  5. The processed image is output, with negated regions handled as configured.

Configuration and Usage

  • Use 'Minimum Size' and 'Minimum Area' to control the smallest regions that will be detected.
  • Adjust 'Outline Thickness' to leave an outline, remove the region, or simply invert it.
  • Tune 'Binarization Settings' to ensure negated regions are clearly separated from the background.
  • Use 'Repair Edges', 'Maximum Fill Weight', and 'Trim Factor' to improve detection on noisy or complex documents.
  • Review diagnostic images to verify that only the intended regions are being processed.

Supported Pixel Formats

  • Pixel8bppGrayscale
  • Pixel24bppBgr
  • Pixel1bppIndexed

Images are automatically converted as needed for processing.

Diagnostics

When run in diagnostic mode, Negative Region Removal generates several diagnostic images to assist with configuration:

  • Binarized: Shows the effect of thresholding and preprocessing.
  • Dark Areas: Highlights detected dark regions, useful for tuning 'Minimum Size' and 'Minimum Area'.
  • Filled: Shows the result of filling small white blobs inside negated regions.
  • Candidates: Displays candidate regions after trimming and preprocessing.
  • Clean Image: Shows the image after edge repair and cleaning.
  • Invert Mask: Visualizes the mask used to invert or remove regions.
  • Printable Area: Shows the area considered printable for region validation.
  • Log Messages: Reports region detection, processing steps, and timing.

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

Notes

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

Properties

NameTypeDescription
General
Image Preprocessing
Command Info

See Also

Used By

Notification