RemoveColorObjects Method of the ImageDocument Object

This method allows you to remove color objects from the image. You can remove red, green, blue, or yellow objects from the whole image, or only from some parts of the image: specified region, its background, or only stamps and signatures in this region.

Important! This method can be used for color images only.

Syntax

C++

HRESULT RemoveColorObjects(
  IRegion*         Region,
  ObjectsColorEnum Color,
  ObjectsTypeEnum  Mode
);
    

C#

void RemoveColorObjects(
  IRegion           Region,
  ObjectsColorEnum Color,
  ObjectsTypeEnum  Mode
);
    

Visual Basic .NET

Sub RemoveColorObjects( _
  Region As IRegion, _
  Color As ObjectsColorEnum, _
  Mode As ObjectsTypeEnum _
)
    

Parameters

Region
[in] This parameter of the Region type specifies the set of rectangles to remove objects from. The coordinates of rectangles are related to the deskewed black-and-white page of the ImageDocument. This parameter may be 0. In this case, color objects are removed from the whole image.
Color
[in] This variable of the ObjectsColorEnum type defines the color of the object.
Mode
[in] This variable of the ObjectsTypeEnum type defines the type of the objects to be removed: objects on the whole image, only background objects, or only color stamps and signatures.

Return values

This method has no specific return values. It returns the standard return values of ABBYY FineReader Engine functions.

Remarks

This method applies color filtering to the color image plane of the ImageDocument. All the other pages are deleted from the ImageDocument. They will be created upon demand.

Consider also using the RemoveColorObjectsEx method, which allows you to remove objects of several specified colors at once, set the background color to replace them, and also receive the image of removed objects. However, it does not support setting the objects' type.

See also

ImageDocument

9/17/2024 3:14:40 PM

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.