OCR Engine API

OCR engine plugin is loaded at first call to any of the following procedures. Path to the plugin is read from dictionary configuration file dictionary.xml.

1. Check OCR engine availability

bool sol_OCR_Available( HGREN hEngine )

Returns true if OCR engine is loaded successfully.

2. Extract text from image file

int sol_OCR_RecognizeFileW( HGREN hEngine, const wchar_t *filename, wchar_t **Buffer )

Returns 1 on success.

Recognized text buffer is allocated by OCR engine and returned via Buffer. sol_Free API call must be used to free this memory.

3. Extract text from memory bitmap (Windows only)

int sol_OCR_RecognizeDIB( HGREN hEngine, HBITMAP hDib, wchar_t **Buffer )

Returns 1 on success.

Recognized text buffer is allocated by OCR engine and returned via Buffer. sol_Free API call must be used to free this memory.

4. Free memory buffer with recognized text

int sol_Free( HGREN hEngine, void *Ptr )

  © Mental Computing 2010
modified  [an error occurred while processing this directive]