Best Practice
General
To get the maximum from our SDK, please consult the reference manual of the main C++ library interface. It is directly mapped to multiple library wrappers and contains a log of useful functionality.
The recognition engine initialization could take some time, but remember that the engine is constant with regards to recognition. The engine can only be initialized once, after that multiple recognition sessions can be spawned from the same engine. The sessions could be spawned in parallel and they will not influence each other in any way.
We recommend evaluating the recognition result confidence by the fields' isAccepted flag. For a more accurate assessment of the confidence level, you can use the Confidence value, which is also available for each text field.
Avoid preprocessing the input images. Our products work best with images taken directly from a capture device (a camera or a scanner).
Avoid too large images. Sometimes a large image resolution does not guarantee better quality quality, but only increases recognition time.
We advise specifying the minimum set of documents that you intend to recognize. This will reduce the search time for the library.
Mobile SDK
Do not keep your personalized signature in a readable form (i.e. in resources), always keep it either encoded in the app's binary or even remotely downloadable.
Always interact with the library interface asynchronously. Initialize the library and create a recognition session before or concurrently with opening the camera view. This ensures the scan button is available to the user almost immediately.
Initialize only a single instance of the library. As library initialization is a resource-intensive operation, always perform it outside the UI thread to avoid blocking the user interface.
Lazy library initialization is enabled in the mobile SDK by default. We recommend keeping this setting enabled in your application.
The bundle is located separately from the library. To minimize initial application size, you can download this bundle from your servers on demand.
In the mobile SDK, we recommend placing the "Scan" button on the camera preview screen. This will allow the user to align the document, wait for the camera to focus and initialize the library before recognition process is started. This approach can speed up recognition, by reducing the number of initial, potentially empty or blurry, frames the library needs to process.
Server SDK
- Remember that you can disable the the internal multithreading of the recognition engine forcing the engine to load and initialize all resources at once. This approach can be useful for determining the peak memory consumption.
- When processing images loaded from local files, ensure these files are stored on high-performance storage. On systems with slow disk I/O, the time required to load an image file can exceed the actual recognition time.
- In server SDKs lazy initialization is disabled by default. We recommend to keep it disabled to reduce memory comsuption.