L_Doc2GetRecognizedCharactersColors

#include "ltdoc2.h"

L_LTDOC2_API L_INT EXT_FUNCTION L_Doc2GetRecognizedCharactersColors(hDoc, nPageIndex, pClrs, pnClrsCount)

L_HDOC2 hDoc;

/* handle to the OCR document */

L_INT nPageIndex;

/* page index */

COLORREF * pClrs;

/* address of array to be updated */

L_INT * pnClrsCount;

/* address of variable to be updated */

Gets the recognized characters colors.

Parameter

Description

hDoc

Handle to the OCR document. This handle is obtained by calling the L_Doc2StartUp function.

nPageIndex

Index of the page. This is a zero-based index.

pClrs

Address of an array of COLORREF to be updated.

pnClrsCount

Address of a variable to be updated with the number of elements in the array.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function gets the recognized characters colors.

After calling the L_Doc2Recognize function, the RECOGCHARS2 structure contains index for foreground and background colors. So, you need to call this function after calling the L_Doc2GetRecognizedCharacters function to get the foreground and background color from the array that will be filled by calling this function.

Call this function by passing NULL to pClrs to get the elements count of colors array. Then allocate array of COLORREF and then call this function again by passing address of the allocated array to pClrs parameter to get the colors.

Required DLLs and Libraries

LTDOC2

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

L_Doc2GetRecognizedCharacters, L_Doc2SetRecognizedCharacters, L_Doc2FreeRecognizedCharacters

Topics:

Recognizing Document Pages

Example

For an exmple, refer to L_Doc2GetRecognizedCharacters