DTWAIN_GetOCRTextInfoFloat

Top  Previous  Next

The DTWAIN_GetOCRTextInfoFloat returns information concerning a specific character in the returned text after an OCR engine has processed an image file.

 

BOOL DTWAIN_GetOCRTextInfoFloat (

DTWAIN_OCRTEXTINFOHANDLE

TextInfoHandle,

LONG

charPos,

LONG

nWhichItem,

LPDTWAIN_FLOAT

pInfo );

 

Parameters:

TextInfoHandle

The value returned by DTWAIN_GetOCRTextInfoHandle.

 

charPos

Position of character in the text in the returned age number of the text information to return.

 

nWhichItem

Character information that is to be retrieved.

 

pInfo

Pointer to a DTWAIN_FLOAT that, on return, will be filled with the information about the character.

 

 

Returns:

If successful, TRUE.  On failure, FALSE is returned.   Call DTWAIN_GetLastError on further information on the failure.

 

Comments:

DTWAIN_GetOCRTextInfoFloat returns information concerning a particular character that the OCR engine has produced after processing an image file.  See the nWhichItem table below as to the type of information that can be returned.

 

The TextInfoHandle is the handle value returned by DTWAIN_GetOCRTextInfoHandle.

 

The charPos value is the zero-based character position of the text that was returned by DTWAIN_GetOCRText.

 

The nWhichItem denotes the information that is to be returned to the caller.  The following table lists the valid values for nWhichItem, as well as a description of the value returned.

 

nWhichItem Values

Description

 

DTWAIN_OCRINFO_CHARCONFIDENCE

Confidence level that the character was accurately translated

 

On return the pInfo value will be filled in with the information desired.  The pInfo cannot be NULL.

 

For LONG information concerning the characters in the OCR-ed text, the DTWAIN_GetOCRTextInfoLong should be used.  If your application desires to get an entire buffer of character information instead of information for a single character, call DTWAIN_GetOCRTextInfoFloatEx.

 

Example

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

DTWAIN_InitOCRInterface

DTWAIN_SelectOCREngine, or DTWAIN_SelectOCREngineByName, or DTWAIN_SelectDefaultOCREngine

DTWAIN_ExecuteOCR

DTWAIN_GetOCRTextInfoHandle