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.
HRESULT RemoveColorObjects( IRegion* Region, ObjectsColorEnum Color, ObjectsTypeEnum Mode );
void RemoveColorObjects( IRegion Region, ObjectsColorEnum Color, ObjectsTypeEnum Mode );
Visual Basic .NET
Sub RemoveColorObjects( _ Region As IRegion, _ Color As ObjectsColorEnum, _ Mode As ObjectsTypeEnum _ )
- [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.
- [in] This variable of the ObjectsColorEnum type defines the color of the object.
- [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.
This method has no specific return values. It returns the standard return values of ABBYY FineReader Engine functions.
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.
3/24/2023 8:51:52 AM