LEADTOOLS OCR C DLL Help > Quick Reference > Data Types > OCR Professional > doc2_conversionmode |
typedef enum
{
DOC2_CONVERSION_AUTO = 0,
DOC2_CONVERSION_SET,
DOC2_CONVERSION_NO,
DOC2_CONVERSION_GLOBAL,
DOC2_CONVERSION_GRAY,
} DOC2_CONVERSIONMODE;
The DOC2_CONVERSIONMODE enumeration specifies how a non-B/W image, which is stored in the engine, will be converted to a B/W image.
Value |
Meaning |
DOC2_CONVERSION_AUTO |
This affects grayscale or 24-bit color images. A B/W image will be created in the engine's memory. Image binarization applies an automatic adaptive thresholding algorithm. The nBrightness member of the DOC2PREPROCESSINGOPTIONS structure can be used to tune the threshold calculation. |
DOC2_CONVERSION_SET |
This affects grayscale or 24-bit color images. A B/W image will be created in the engine's memory. Thresholding with a user-defined threshold value, is set by the nThreshold member of the DOC2PREPROCESSINGOPTIONS structure. |
DOC2_CONVERSION_NO |
There will be no conversion while image loading. The image will be loaded into the engine's memory without any conversion (i.e. a color image will retain its color attributes). |
DOC2_CONVERSION_GLOBAL |
This affects grayscale or 24-bit color images. A B/W image will be created in the engine's memory. For image binarization, an automatic thresholding algorithm with a page-level global threshold value is applied. |
DOC2_CONVERSION_GRAY |
For a color image, a grayscale image will be created in the engine's memory. For a B/W or grayscale image, no conversion will be performed while loading the image. |
Comments
This enumeration is used by the following structure: