Performs page pre-processing commands.
enum
{
L_OcrAutoPreprocessPageCommands_None = 0x00,
L_OcrAutoPreprocessPageCommands_Deskew = 0x01,
L_OcrAutoPreprocessPageCommands_Rotate = 0x02,
L_OcrAutoPreprocessPageCommands_Invert = 0x04,
L_OcrAutoPreprocessPageCommands_All = 0xFF
}; typedef L_UINT L_OcrAutoPreprocessPageCommands;
None.
Automatic deskewing. If the image is skewed, the IOcrPage.AutoPreprocess method will try to deskew it.
Automatic rotation. If the image is rotated (its view perspective is anything other than top-left), the IOcrPage.AutoPreprocess method will auto orient it to top-left. This command is especially useful if the image upside-down.
Automatic inversion. If the image is black and white and is inverted (contains white on black data), the IOcrPage.AutoPreprocess method will automatically convert the image data to be black on white.
Run all the commands (Deskew, Rotate, Invert).
The OCR engine can perform a series of image pre-processing steps in order to enhance the quality of the image before starting its recognition.
Perform these image pre-processing steps by calling the L_OcrPage_AutoPreprocess function. Call this function prior to calling L_OcrPage_Recognize.