Skip to content

Best Practice

General

  1. 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.
  2. 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.
  3. 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.
  4. Avoid preprocessing the input images. Our products work best with images taken directly from a capture device (a camera or a scanner).
  5. Avoid too large images. Sometimes a large image resolution does not guarantee better quality quality, but only increases recognition time.

Mobile SDK

  1. 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.

  2. 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.

  3. 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.

  4. Lazy library initialization is enabled in the mobile SDK by default. We recommend keeping this setting enabled in your application.

  5. If you know exactly which document the user should scan, draw a frame over the scanning screen in the UI. It helps the user to align the document with the camera. It could speed up the recognition process.

  6. The configuration bundle is separate from the library, so, to minimize the application size, you could exclude it from the package and download it from your servers after the application start, if needed.

  7. We recommend adding an additional "Scan" button after opening the camera preview - this forces the user to align the document better and wait for the camera to focus before starting the recognition. It could speed up the capturing process, since the engine will process fewer empty frames.

  8. Use the fields' GetAcceptFlag() flag to draw attention to the fields which were recognized with low confidence.

  9. Initialize the recognition engine in an auxiliary background thread of your application before making the document scanning option available. That way the user will not have to wait for the engine to initialize when it's time to scan the document.

Server SDK

  1. 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.

  2. 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.

  3. In server SDKs lazy initialization is disabled by default. We recommend to keep it disabled to reduce memory comsuption.

  4. If you load the images from a file, make sure that the loaded files are placed in a high-performance disk device - on some machines, the time required to load an image from a file could be longer than the recognition itself.

  5. Avoid using any pre-processing of the input images - our products best work with the images obtained directly from the capturing device (camera or scanner).