|L_OcrAutoRecognizeManager autoRecognizeManager;||handle to the OCR auto recognize manager|
|L_OcrAutoRecognizeJob autoRecognizeJob;||handle to the OCR auto recognize job|
Runs a job.
|autoRecognizeManager||Handle to the OCR engine auto recognize manager.|
|autoRecognizeJob||Handle to the OCR engine auto recognize job.|
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
If you call this method from the same thread that created L_OcrAutoRecognizeManager, then the current thread will block till this method returns. To run a job asynchronously, use L_OcrAutoRecognizeManager_RunJobAsync.
When this method returns you can call L_OcrAutoRecognizeJob_GetErrors to get any errors that might occurred during the recognition process.
To use this method, initialize a new L_OcrAutoRecognizeJobData structure with the job's parameters (input image file name, pages, output document format, output document name, optional zones file name, etc.), then use L_OcrAutoRecognizeManager_CreateJob to create the L_OcrAutoRecognizeJob handle passed as job handle to this method. Finally, call L_OcrAutoRecognizeManager_RunJob passing the L_OcrAutoRecognizeJob handle.
This method will perform the following operations:
Loops through the pages specified in L_OcrAutoRecognizeJobData.FirstPageNumber and in L_OcrAutoRecognizeJobData.LastPageNumber in L_OcrAutoRecognizeJobData.ImageFileName and for each page:
1. The page is created using L_OcrPage_FromBitmap after we load the file into BITMAPHANDLE.
2. If L_OcrAutoRecognizeJobData.ZonesFileName contains a valid multi-page zone file name and has an entry for the current page, then the zones are loaded with L_OcrPage_LoadZonesFile and applied to the page. If L_OcrAutoRecognizeJobData.ZonesFileName is a NULL or is empty string or it does not contain an equivalent page number, auto-decomposing of the page is performed instead with L_OcrPage_AutoZone.
3. L_OcrPage_Recognize is called to get the OCR data of the page.
4. The page is added to the internal OCR document using L_OcrDocument_AddPage.
The L_OcrAutoRecognizeManager also has some options that you can control, For more information about these options, refer to L_OcrAutoRecognizeManager_GetOptions and L_OcrAutoRecognizeManager_SetOptions.
Required DLLs and Libraries
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.
|Functions:||L_OcrAutoRecognizeManager_GetOptions, L_OcrAutoRecognizeManager_SetOptions, L_OcrAutoRecognizeManager_GetJobOperationCallback, L_OcrAutoRecognizeManager_SetJobOperationCallback, L_OcrAutoRecognizeManager_GetRunJobCallback, L_OcrAutoRecognizeManager_SetRunJobCallback, L_OcrAutoRecognizeManager_CreateJob, L_OcrAutoRecognizeManager_RunJobAsync, L_OcrAutoRecognizeManager_AbortAllJobs, L_OcrAutoRecognizeManager_Run|
|Topics:||Programming with LEADTOOLS OCR Module - LEAD Engine|
|Starting and Shutting Down the OCR Engine|
|Recognizing OCR Pages|
|Working With OCR Pages|
For an example, refer to L_OcrAutoRecognizeManager_SetJobOperationCallback