Chinese Simplified (简体中文)

AddRemoveGarbageRegion Method of the ImageModification Object

This method adds a new "remove garbage" region to the internal array of "remove garbage" regions of the ImageModification object. To remove all the "remove garbage" regions previously added call the IImageModification::ClearRemoveGarbageRegions method. The coordinates of the region should be specified on the deskewed black-and-white image plane.

Syntax

HRESULT AddRemoveGarbageRegion(
  IRegion* Region,
  int      Attributes,
  int      GarbageSize
);
    

Parameters

Region
[in] This parameter of the Region type specifies the "remove garbage" region to be added.
Attributes
[in] This variable may either contain 0 or RGR_Invert constant of the RemoveGarbageRegionFlags module. If RGR_Invert is passed, then white garbage on black background will be removed.
GarbageSize
[in] This variable specifies the maximum size of black dots that are to be considered garbage, in pixels. The -1 value for this input parameter tells ABBYY FineReader Engine to automatically calculate the size of garbage.

Return values

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

Remarks

The parts of the image inside the "remove garbage" regions will be cleaned up when IImageDocument::Modify method is applied.

See also

ImageModification

ClearRemoveGarbageRegions

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.