FineReader Engines Pool - Multithreading Sample (Linux)

FineReader Engine
11, 12
Code Samples Collection
Programming Aspects
Recognition, OCR: Speed & Quality
C++, Java
image: icon_batchprocessingrecognition.gif

The sample demonstrates how to implement a multi-threaded application for image conversion.


The procedure uses the basic objects and methods of ABBYY FineReader Engine. To load the Engine as an out-of-process server include OutprocEngineLoader.h file instead of FREngineLoader.h file.

Do the following:

  1. Create a number of worker threads for image parallel processing.
  2. For each worker thread:
    1. Create the Engine object using the InitializeEngine function.
    2. [optional] Load a predefined profile for your scenario using the LoadPredefinedProfile method of the Engine object.
    3. Specify sequential mode of document processing. Set MultiProcessingMode property of MultiProcessingParams object to MPM_Sequential.
    4. Call the CreateFRDocument or the CreateFRDocumentFromImage method of the Engine object to create the FRDocument object.
    5. Use the AddImageFile method of the FRDocument object to add the image file to the document.
    6. [optional] Create the DocumentProcessingParams object and set the page processing parameters (for preprocessing, analysis, and recognition) and document synthesis parameters.
    7. Call the Process method of the FRDocument object.
    8. [optional] Create an export parameter object of the type you need. The type of this object depends on the format of the output file you would like to use (FileExportFormatEnum). The default object values are the ones used most frequently, but you may set the export parameters as you like.
    9. Call the Export method of the FRDocument object to save the document to a file of the specified format.
    10. Close the FRDocument object using the Close method.
    11. Unload FineReader Engine — use the DeinitializeEngine function.

For the description of used objects and their methods and properties see the Developer's Help.

Back To:

This website uses cookies which enable you to see pages or use other functions of our websites. You can turn off such cookies in your browser’s settings. If you continue to use these pages, you consent to the use of cookies.
  • No tags, yet