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

Threshold

Binarize Grooper.IP

Converts an image to black and white (binary) using a variety of thresholding methods.

Remarks

The Threshold command provides advanced binarization for images, supporting multiple thresholding algorithms to accommodate a wide range of document types and image qualities. This command is essential for preparing images for OCR, archival, or any workflow that requires high-contrast, black-and-white output.

The command supports the following thresholding methods:

  • Simple: Applies a fixed threshold value to all pixels.
    Use for documents with consistent backgrounds and lighting.
  • Auto: Automatically determines the optimal threshold using Otsu's method, with optional adjustment and range limits.
    Ideal for most standard scanned documents.
  • Adaptive: Calculates a local threshold for each pixel, compensating for uneven lighting or backgrounds.
    Useful for documents with shadows, stains, or variable backgrounds.
  • Dynamic: Similar to adaptive, but preserves dark regions more aggressively, making it suitable for faint handwriting, stamps, or pencil marks.

How It Works

  1. Select the thresholding method using the 'Method' property.
  2. Adjust additional properties (such as threshold value, window size, or black grouping) to fine-tune results for your document type.
  3. The command processes the image and outputs a 1-bit (black and white) image, suitable for OCR and archival.

Supported Pixel Formats

  • All pixel formats except 1-bit images are supported as input.
  • Output is always Pixel1bppIndexed (black and white).

Diagnostics

When diagnostic mode is enabled, Threshold generates diagnostic images and logs to help you visualize the thresholding process and optimize settings. Diagnostics include:

  • Before-and-after images
  • Threshold value overlays
  • Local threshold maps (for adaptive/dynamic)

Configuration Guidance

  • Use 'Auto' or 'Adaptive' for most scanned documents.
  • Use 'Dynamic' for documents with faint marks or challenging backgrounds.
  • Fine-tune properties such as 'Threshold', 'Window Size', 'Delta', and 'Black Grouping' to achieve the best results for your specific documents.
  • Not all properties are used by every method; property visibility is context-sensitive.

For most workflows, start with 'Auto' or 'Adaptive' and adjust as needed based on diagnostic output.

Properties

NameTypeDescription
General
Command Info

Used By

Notification