iDRS™ SDK 16
Loading...
Searching...
No Matches
COcrContext_interface.h File Reference

Interface for COcrContext wrapper. More...

Go to the source code of this file.

Functions

COcrContext COcrContext_Create (enum Language const lLanguage, idrs_exception *pargException)
 Create creates an OCR context for the given language and text type parameters.
 
COcrContext COcrContext_Create2 (const LanguageArray xlLanguages, idrs_exception *pargException)
 Create creates an OCR context for the given languages and text type parameters.
 
COcrContext COcrContext_Create3 (enum Language const *xlLanguages, IDRS_UINT const uiLanguagesCount, idrs_exception *pargException)
 Create creates an OCR context for the given languages and text type parameters.
 
LanguageArray COcrContext_GetLanguages (const COcrContext argCOcrContext, idrs_exception *pargException)
 Gets the languages used for ocr recognition.
 
void COcrContext_SetLanguages (COcrContext argCOcrContext, const LanguageArray argLanguages, idrs_exception *pargException)
 Set the ocr recognition languages.
 
void COcrContext_SetTextDetectionSensivity (COcrContext argCOcrContext, enum TextDetectionSensivity const evTextDetectionSensivity, idrs_exception *pargException)
 Sets the text detection sensitivity.
 
enum TextDetectionSensivity COcrContext_GetTextDetectionSensivity (const COcrContext argCOcrContext, idrs_exception *pargException)
 Gets the text detection sensitivity.
 
void COcrContext_SetFontInfoComputation (COcrContext argCOcrContext, enum FontInfoComputation const evFontInfoComputation, idrs_exception *pargException)
 Sets the font computation type.
 
enum FontInfoComputation COcrContext_GetFontInfoComputation (const COcrContext argCOcrContext, idrs_exception *pargException)
 Gets the font computation type.
 
void COcrContext_SetCharacterSet (COcrContext argCOcrContext, const idrs_string strCharacterSet, idrs_exception *pargException)
 Sets the character set to be used during text recognition.
 
const idrs_string COcrContext_GetCharacterSet (const COcrContext argCOcrContext, idrs_exception *pargException)
 Gets the character set to be used during text recognition.
 
void COcrContext_SetTextType (COcrContext argCOcrContext, enum TextType const evTextType, idrs_exception *pargException)
 Sets the type of text that is expected to be recognized.
 
enum TextType COcrContext_GetTextType (const COcrContext argCOcrContext, idrs_exception *pargException)
 Gets the text type associated to this ocr context.
 
void COcrContext_SetTextDirection (COcrContext argCOcrContext, enum TextDirection const evTextDirection, idrs_exception *pargException)
 Sets the direction of the text which this context will search on the page.
 
enum TextDirection COcrContext_GetTextDirection (const COcrContext argCOcrContext, idrs_exception *pargException)
 Gets the direction of the text which this context will search on the page.
 
IDRS_BOOL COcrContext_IsEqual (const COcrContext argCOcrContext, const COcrContext argOcrContext, idrs_exception *pargException)
 IsEqual tests if two ocr contexts are equal.
 
void COcrContext_Destroy (COcrContext argCOcrContext, idrs_exception *pargException)
 Destroys a COcrContext handle.
 

Detailed Description

Interface for COcrContext wrapper.

Function Documentation

◆ COcrContext_Create()

COcrContext COcrContext_Create ( enum Language const  lLanguage,
idrs_exception *  pargException 
)

Create creates an OCR context for the given language and text type parameters.

Parameters
lLanguageThe identifier for the recognition language.
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ COcrContext_Create2()

COcrContext COcrContext_Create2 ( const LanguageArray  xlLanguages,
idrs_exception *  pargException 
)

Create creates an OCR context for the given languages and text type parameters.

Parameters
xlLanguagesAn array that contains the identifiers for the languages to recognize.
pargExceptionPointer to exception structure that will be filled if an exception occurs

page7

◆ COcrContext_Create3()

COcrContext COcrContext_Create3 ( enum Language const *  xlLanguages,
IDRS_UINT const  uiLanguagesCount,
idrs_exception *  pargException 
)

Create creates an OCR context for the given languages and text type parameters.

Parameters
xlLanguagesAn array that contains the identifiers for the languages to recognize.
uiLanguagesCountNumber of language items in xlLanguages argument.
pargExceptionPointer to exception structure that will be filled if an exception occurs

page7

◆ COcrContext_Destroy()

void COcrContext_Destroy ( COcrContext  argCOcrContext,
idrs_exception *  pargException 
)

Destroys a COcrContext handle.

Parameters
argCOcrContextCOcrContext handle to destroy
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ COcrContext_GetCharacterSet()

const idrs_string COcrContext_GetCharacterSet ( const COcrContext  argCOcrContext,
idrs_exception *  pargException 
)

Gets the character set to be used during text recognition.

Returns
Buffer containing the characters to be used during text recognition
Parameters
argCOcrContextCOcrContext handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ COcrContext_GetFontInfoComputation()

enum FontInfoComputation COcrContext_GetFontInfoComputation ( const COcrContext  argCOcrContext,
idrs_exception *  pargException 
)

Gets the font computation type.

Returns
Font computation type
Parameters
argCOcrContextCOcrContext handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ COcrContext_GetLanguages()

LanguageArray COcrContext_GetLanguages ( const COcrContext  argCOcrContext,
idrs_exception *  pargException 
)

Gets the languages used for ocr recognition.

Attention
All changes to the returned object will have effect on the COcrContext object
Parameters
argCOcrContextCOcrContext handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ COcrContext_GetTextDetectionSensivity()

enum TextDetectionSensivity COcrContext_GetTextDetectionSensivity ( const COcrContext  argCOcrContext,
idrs_exception *  pargException 
)

Gets the text detection sensitivity.

Returns
Text detection sensitivity
Parameters
argCOcrContextCOcrContext handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ COcrContext_GetTextDirection()

enum TextDirection COcrContext_GetTextDirection ( const COcrContext  argCOcrContext,
idrs_exception *  pargException 
)

Gets the direction of the text which this context will search on the page.

By default, the text direction is set to TextDirection.Any: text will be searched in any supported direction by the context's languages.

Returns
The direction this context will consider when reading text on the page.
Remarks
At the moment this parameter is taken into account only for Japanese, Korean, and Traditional Chinese OCR.
Parameters
argCOcrContextCOcrContext handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ COcrContext_GetTextType()

enum TextType COcrContext_GetTextType ( const COcrContext  argCOcrContext,
idrs_exception *  pargException 
)

Gets the text type associated to this ocr context.

By default, the text type is set to TextType::Printed

Returns
Text type associated to the context
Parameters
argCOcrContextCOcrContext handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ COcrContext_IsEqual()

IDRS_BOOL COcrContext_IsEqual ( const COcrContext  argCOcrContext,
const COcrContext  argOcrContext,
idrs_exception *  pargException 
)

IsEqual tests if two ocr contexts are equal.

Parameters
argCOcrContextCOcrContext handle
argOcrContextThe ocr context to compare to
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
IDRS_TRUE if the provided ocr context equals the ocr context.

◆ COcrContext_SetCharacterSet()

void COcrContext_SetCharacterSet ( COcrContext  argCOcrContext,
const idrs_string  strCharacterSet,
idrs_exception *  pargException 
)

Sets the character set to be used during text recognition.

Parameters
argCOcrContextCOcrContext handle
strCharacterSetBuffer containing the characters to be used during text recognition
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ COcrContext_SetFontInfoComputation()

void COcrContext_SetFontInfoComputation ( COcrContext  argCOcrContext,
enum FontInfoComputation const  evFontInfoComputation,
idrs_exception *  pargException 
)

Sets the font computation type.

Parameters
argCOcrContextCOcrContext handle
evFontInfoComputationFont computation type
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ COcrContext_SetLanguages()

void COcrContext_SetLanguages ( COcrContext  argCOcrContext,
const LanguageArray  argLanguages,
idrs_exception *  pargException 
)

Set the ocr recognition languages.

Parameters
argCOcrContextCOcrContext handle
argLanguagesThe array containing the languages to be used during ocr recognition
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ COcrContext_SetTextDetectionSensivity()

void COcrContext_SetTextDetectionSensivity ( COcrContext  argCOcrContext,
enum TextDetectionSensivity const  evTextDetectionSensivity,
idrs_exception *  pargException 
)

Sets the text detection sensitivity.

Parameters
argCOcrContextCOcrContext handle
evTextDetectionSensivityText detection sensitivity
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ COcrContext_SetTextDirection()

void COcrContext_SetTextDirection ( COcrContext  argCOcrContext,
enum TextDirection const  evTextDirection,
idrs_exception *  pargException 
)

Sets the direction of the text which this context will search on the page.

By default, the text direction is set to TextDirection.Any: text will be searched in any supported direction by the context's languages.

Parameters
argCOcrContextCOcrContext handle
evTextDirectionThe direction this context will consider when reading text on the page.
pargExceptionPointer to exception structure that will be filled if an exception occurs
Remarks
At the moment this parameter is taken into account only for Japanese, Korean, and Traditional Chinese OCR.

◆ COcrContext_SetTextType()

void COcrContext_SetTextType ( COcrContext  argCOcrContext,
enum TextType const  evTextType,
idrs_exception *  pargException 
)

Sets the type of text that is expected to be recognized.

By default, the text type is set to TextType::Printed

Parameters
argCOcrContextCOcrContext handle
evTextTypeText type - see
See also
TextType for more details
Parameters
pargExceptionPointer to exception structure that will be filled if an exception occurs