DOC2PREPROCESSINGOPTIONS

typedef struct _tagDOC2PREPROCESSINGOPTIONS 
{ 
   L_UINT32 uStructSize; 
   DOC2_CONVERSIONMODE BinarizationMode; 
   DOC2_INVERTMODE InvertMode; 
   DOC2_ROTATEMODE RotationMode; 
   L_BOOL EnableDespeckleMode; 
   L_INT nBrightness; 
   L_INT nThreshold; 
} DOC2PREPROCESSINGOPTIONS, * pDOC2PREPROCESSINGOPTIONS; 

The DOC2PREPROCESSINGOPTIONS structure provides information about some pre-processing settings.

Members

uStructSize

Structure size. Set it to sizeof(DOC2PREPROCESSINGOPTIONS).

BinarizationMode

Specifies how a non-B/W image stored in the engine is converted to a B/W image. For a list of possible values, refer to DOC2_CONVERSIONMODE.

InvertMode

Specifies which image inversion mode (white-on-black to black-on-white), will be used during image processing. The image inversion mode can be either automatic, switched on, or switched off. For a list of possible values, refer to DOC2_INVERTMODE.

RotationMode

Specifies which image rotation mode will be used during image processing. The image rotation mode can be automatic, switched off, or programmable. For a list of possible values, refer to DOC2_ROTATEMODE.

EnableDespeckleMode

Specifies the engine's image despeckle mode (i.e., whether the adaptive noise removal algorithm is to be activated implicitly if the current image is a B/W image). The noise removal algorithm runs only on B/W images that have a resolution of 280 DPI or higher. EnableDespeckleMode can affect recognition accuracy. Possible values are:

Value Meaning
TRUE Activate the adaptive noise removal algorithm.
FALSE Deactivate the adaptive noise removal algorithm.

nBrightness

Fine-tunes the threshold calculation in the automatic adaptive image conversion mode of grayscale or 24-bit color images (only if the BinarizationMode member is set to DOC2_CONVERSION_AUTO). A B/W image will be created in the engine's memory. The automatic adaptive image conversion mode influences the brightness/darkness of the resulting B/W image during image processing. Valid values range between 0 to 100.

nThreshold

Specifies the threshold parameter of grayscale or 24-bit color image conversion to a B/W image (only if the BinarizationMode member is set to DOC2_CONVERSION_SET). A B/W image will be created in the engine's memory, and nThreshold is used during image processing.

Comments

pDOC2PREPROCESSINGOPTIONS is a pointer to a DOC2PREPROCESSINGOPTIONS structure. If the function parameter type is pDOC2PREPROCESSINGOPTIONS, declare a DOC2PREPROCESSINGOPTIONS variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pDOC2PREPROCESSINGOPTIONS variable is necessary only if the program requires a pointer.

The structure is used by:

Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS OCR Module - OmniPage Engine C API Help