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

Classify Image

IP Command Grooper.IP

Classifies an image by comparing it to a set of sample images, assigning the image to the class with the highest similarity.

Remarks

The Classify Image command enables automated image classification by evaluating the visual similarity between an input image and a collection of user-defined sample images. This is useful for document separation, form recognition, and other scenarios where images must be grouped or routed based on their appearance.

Supported Pixel Formats

Classify Image supports both grayscale and color images. The command automatically converts the input image to the selected color space (e.g., RGB, HSV, LAB) as specified by the 'Color Space' property before extracting features. This ensures consistent feature extraction regardless of the original image format.

How the Command Works

Classify Image operates by extracting a feature vector from the input image and comparing it to feature vectors generated from each sample image in the 'Sample Images' collection. The similarity between the input and each sample is calculated using Euclidean distance or a similar metric. The image is assigned to the class with the highest similarity score, provided that the score meets or exceeds the threshold set by the 'Minimum Similarity' property. If no class meets the threshold, the value of 'Default Image Class' is used.

The feature extraction process considers both color and grayscale statistics, including channel intensities and entropy, to provide robust classification even in the presence of noise or minor variations.

Purpose and Use Cases

This command is primarily used to support conditional branching in IP Profiles, allowing Grooper to automatically execute different logic for images based on their classification. For example, to apply additional cleanup to noisy images. To use Classify Image, add an IP Step to your IP Profile that includes this command, and add a 'Next Step' expression which branches to the appropriate steps based on the detected class name.

Diagnostics Generated

When diagnostic mode is enabled, Classify Image logs the computed similarity scores for each class, the selected class name, and the feature values extracted from the input image. This information is valuable for tuning the sample set, adjusting similarity thresholds, and troubleshooting misclassifications. Diagnostic output may include log entries such as:

Class Name: Invoice (97.5%)

Source Image Features Channel 1: 0.82 Channel 2: 0.79 Channel 3: 0.80 Entropy: 6.12

Results for Trained Image Classes Invoice: 97.5% Statement: 85.2% Letter: 72.1%

Classification Features

Classify Image generates a classification result in the form of a class name, which can be used for document separation, workflow routing, or downstream processing. The classification is based on a combination of color and grayscale features, including channel intensities and entropy, providing resilience to variations in lighting, color, and document quality.

Configuration Guidance

  • Add representative sample images to the 'Sample Images' collection for each class you wish to detect.
  • Set the 'Minimum Similarity' property to control the strictness of classification. Higher values require a closer match.
  • Choose the appropriate 'Color Space' for your documents. For most cases, RGB or LAB provide good results.
  • Use the 'Default Image Class' property to specify the class name to assign when no match meets the similarity threshold.
  • Enable diagnostic mode to review similarity scores and feature values, helping you refine your sample set and thresholds.

Classify Image is typically used in the early stages of a document processing workflow to automate document type detection, batch separation, or to trigger specialized processing based on image content.

Properties

NameTypeDescription
General
Command Info

See Also

Used By

Notification