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
HRESULT RemoveColorObjects( IRegion* Region, ObjectsColorEnum Color, ObjectsTypeEnum Mode );
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
03.07.2024 8:50:25