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

Randomize Defects

IP Command Grooper.IP

Applies randomized defects to an image to simulate common scanning artifacts for testing of image cleanup workflows.

Remarks

The Randomize Defects command is designed to introduce a variety of artificial defects into images, mimicking the types of imperfections frequently encountered in real-world scanned documents. This is especially useful for testing the robustness and effectiveness of IP Profiles and image cleanup routines prior to production deployment.

By simulating noise, skew, border artifacts, scaling, and alignment shifts, Randomize Defects helps ensure that your image processing pipeline can handle a wide range of document conditions and maintain high-quality results even when input images are degraded or inconsistent.

Supported Pixel Formats

Randomize Defects supports all basic pixel formats, including 8-bit grayscale and 24-bit color images. Binary images are automatically converted to grayscale for processing, and re-binarized if necessary after defects are applied.

How the Command Works

The command provides several configurable defect generators, each responsible for a specific type of artifact:

  • Random Noise: Adds black specks to simulate dust or toner scatter.
  • Random Skew: Rotates the image by a small, random angle to mimic misaligned scanning.
  • Random Border: Adds black borders of random thickness to simulate edge artifacts.
  • Random Scale: Slightly enlarges or shrinks the image, as might occur with photocopying or faxing.
  • Random Alignment: Shifts the image horizontally or vertically to simulate misfeeds or misalignment.

Each defect generator can be enabled or disabled independently using its corresponding property. When enabled, the generator applies its effect with a configurable probability and within user-defined parameter ranges. The order of application is alignment, border, noise, scale, then skew, but only enabled generators are executed.

Diagnostics Generated

When diagnostic mode is enabled, Randomize Defects logs details about each defect applied, such as the number of noise specks, skew angle, border size, scale factor, or translation distance. These logs help you verify the types and severity of defects being introduced, and can be used to tune your test scenarios for maximum coverage.

Example diagnostic log output: Specks Added: 3,200 Skew Angle: 0.7 Borders Added: Left=6pt, Top=2pt, Right=4pt, Bottom=3pt Scale Factor: 98% Translation: 0.05in, -0.02in

Classification Features

Randomize Defects does not generate classification features. Its primary purpose is to simulate defects for testing and validation, not to extract or analyze document content.

Configuration Guidance

  • Enable or disable each defect generator as needed to match the types of artifacts you want to simulate.
  • Adjust the probability and parameter ranges for each generator to control the frequency and severity of defects.
  • Use this command in a test or QA IP Profile to validate that your cleanup and recognition steps are robust against real-world document imperfections.
  • Review diagnostic logs to ensure that the simulated defects are appropriate for your testing goals.

Properties

NameTypeDescription
General
Command Info

See Also

Used By

Notification