Grooper Help - Version 25.0
25.0.0024 2,166

Filter

IP Command Grooper.IP

Applies a configurable filter to an image for noise reduction, enhancement, or feature transformation.

Remarks

The Filter command provides a flexible set of image filtering operations, enabling users to reduce noise, enhance features, or prepare images for downstream processing. By supporting a variety of filter types—including smoothing, sharpening, edge detection, and noise reduction—Filter is a versatile tool for improving image quality and extracting relevant features from scanned documents or photographs.

Supported Pixel Formats

Filter supports all basic pixel formats, including 8-bit grayscale and 24-bit color images. The command automatically applies the selected filter to each channel as appropriate for the image type. Binary images are first converted to grayscale before filtering, and the result is re-binarized if needed.

How the Command Works

The Filter command allows you to select from a range of filter types using the 'Filter Type' property. Available options include average, median, Gaussian, min/max, sharpen, Wiener, Laplacian, and more. Each filter type is designed for a specific purpose:

  • Smoothing and Noise Reduction: Use average, median, Gaussian, or Wiener filters to reduce random noise and smooth variations in the image.
  • Sharpening and Edge Enhancement: Use sharpen, high-pass, or Laplacian filters to enhance edges and fine details.
  • Feature Transformation: Use min, max, or median cross filters to manipulate specific features or prepare images for further analysis.

The effect of the filter is controlled by mask size and shape, which can be configured using properties such as 'Mask Width', 'Mask Height', 'Mask Size', or 'Predefined Mask Size'. For Gaussian filters, the 'Sigma' property controls the amount of blurring. For Wiener filters, the 'Noise' property specifies the expected noise level as a percentage.

Not all properties are relevant for every filter type. Property visibility is context-sensitive and will adjust based on the selected filter.

Diagnostics Generated

Filter does not generate classification features, but it can produce diagnostic output when enabled. Diagnostics may include before-and-after images or logs to help you evaluate the effect of different filter settings. Use these diagnostics to fine-tune filter parameters for your specific documents and processing goals.

Configuration Guidance

  • Select the desired filter type using the 'Filter Type' property.
  • Adjust mask size and shape to control the strength and area of the filter effect. For example, larger masks produce stronger smoothing or sharpening.
  • For Gaussian filters, increase 'Sigma' for more blurring.
  • For Wiener filters, set 'Noise' to match the expected noise level in your images.
  • Use diagnostic mode and visual inspection to evaluate the impact of your configuration.
  • Example: To reduce salt-and-pepper noise, use the 'Median' filter with a mask size of 5px or 7px.

Filter is commonly used in preprocessing pipelines to clean up scanned documents, enhance text or graphics, and prepare images for OCR, extraction, or further analysis.

Properties

NameTypeDescription
General
Command Info

Used By

Notification