Chinese Simplified (简体中文)

ColorObjectsProhibitingParams Object (IColorObjectsProhibitingParams Interface)

This object is used for tuning parameters of filtering out the color objects on the image before starting processing. This kind of preprocessing can be useful in cases when the document to be recognized has color stamps, signatures etc., which can reduce recognition quality. With the help of this object's properties you can set up the collection of colors which must be filtered out, and specify whether after recognition the color objects must be placed back on the image again.

This object can only exist as a subobject of the PageProcessingParams object. It must be created or written to persistent storage together with the parent object.

Properties

Name Type Description
Application Engine, read-only Returns the Engine object.
BackgroundColor int

Specifies the color which must replace the removed color objects.

Note: The int value is calculated from the RGB triplet using the formula: (red value) + (256 x green value) + (65536 x blue value), where red value is the first triplet component, green value is the second triplet component, blue value is the third triplet component. For example, the int value of the color white equals 16777215.

The default value of this property is -1, which means that the color will be selected automatically.

ColorHues IntsCollection

Specifies the collection of the hues of the objects which must be filtered, in HSL representation. The number which specifies a hue must be in range from 0 to 255. The value 0 corresponds to red color, 43 — to yellow, 85 — to green, 171 — to blue, 213 — to purple.

By default, the collection is empty, which means that all color objects will be filtered out and only the gray image passed for processing.

RestoreColorObjectsAfterProcessing VARIANT_BOOL

Specifies if, after processing is complete, the color objects must be put back on the image again. Use this property set to TRUE when you need to receive both good quality recognized text and the color image with all stamps, signatures etc. in place. This can be useful, for example, when exporting to image-on-text PDF.

The default value of this property is TRUE.

Related objects

Object Diagram

Remarks

Consider also using the RemoveColorObjectsEx method of the ImageDocument object, which performs the same operation of color objects filtering but lets you save the extracted color layer into a separate image.

See also

Tuning Parameters of Preprocessing, Analysis, Recognition, and Synthesis

Working with Properties

03.07.2024 8:50:25

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.