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

Patch Code Detection

IP Command Grooper.IP

Detects patch codes in an image for use in document separation and classification workflows.

Remarks

The Patch Code Detection command analyzes an image to determine if it contains a valid patch code barcode. Patch codes are commonly used to automate document separation, batch breaks, or routing in scanning and capture processes. This command returns true if a patch code is detected and false if none are found.

How Patch Code Detection Works

  1. The command preprocesses the image (binarization is performed automatically).
  2. The patch code reader scans the image in the specified direction(s), searching for recognizable patch code barcodes.
  3. If a valid patch code is found, its value, orientation, and location are recorded in the result.
  4. The result can be used for downstream separation, classification, or routing logic.

Supported Pixel Formats

All common pixel formats are supported, including Pixel8bppGrayscale, Pixel24bppBgr, and Pixel1bppIndexed. Images are automatically converted as needed for patch code detection.

Diagnostics

When run in diagnostic mode, Patch Code Detection generates additional output to assist with configuration and troubleshooting:

  • Diagnostic images with detected patch codes annotated on the image.
  • Log messages listing the number of patch codes found, their values, orientations, and bounding rectangles.

These diagnostics help you verify that patch codes are being detected as expected and tune detection parameters for your documents.

Layout Data

Detected patch codes are captured as Layout Data, including their symbology, value, orientation, and bounding rectangle. This Layout Data can be used by downstream activities for separation, indexing, or validation.

Classification Features

For each patch code detected, Patch Code Detection generates classification features that are added to the result's feature dictionary. Specifically, for every patch code, a feature is added for its symbology (e.g., ReadBarcodes.BarcodeType.Patch) and for its value (e.g., ReadBarcodes.BarcodeValue.T). These features can be used by downstream classification, separation, or routing logic to make decisions based on the presence, type, or value of patch codes found on the page.

Configuration and Usage

To use Patch Code Detection, add it to an IP Profile or configure it as a property of a Grooper object. Adjust the 'Read Directions', 'Quiet Zone Tolerance', 'Read Quality', and 'Scan Interval' properties to match the expected characteristics of patch codes in your documents. Use diagnostic output to ensure reliable detection and to fine-tune settings for your specific document types and image quality.

Properties

NameTypeDescription
General
Command Info

Used By

Notification