How To Get The Best Low Level API Performance

By default the Scandit SDK is optimized for real-time video streaming. In general barcodes in the image will not be decoded in every frame. Instead the engine tries to skip bad frames to meet real-time processing constraints.

Single image processing use-cases, e.g. scanning a scanned or photographed document, require a specific setup.

General

  • Use a YUV or Grayscale image input format. RGB will be converted internally.
  • Use an image resolution between 800x600 to 1920x1080. 1280x720 is recommended.
  • Make sure to have an area of at least 320x160 pixels when setting a restricted code location area for barcode localization.
  • Having a working GPU (OpenGLES 2.0) support improves the performance of the barcode localization. The CPU fallback is less accurate and slower.
  • Having SIMD CPU support (NEON or SSE) improves execution times.
  • Pre-cropping the image is not required. The SDK can find the barcodes in the image.
  • Pre-processing (filter, blur, binarize) the image is not recommended. Provide natural images.
  • Very long codes require that you setup the symbol counts that you want to scan.
  • Blurry decoding using your custom camera and camera lens will not perform as well as high-end iOS or Android devices. Please contact us if specific optimizations for your camera are desired.

Video Streaming Mode

  • To achieve comparable results as the high level Data Capture API, you have to create barcode specific camera control algorithms that adjust exposure and auto-focus.

Single Image Mode

Why does scanning a single image not perform as good as scanning with the mobile phone?

  • Starting from SDK version 5.4 the settings preset SC_PRESET_ENABLE_SINGLE_FRAME_MODE can be used to improve performance.
  • The input image should be uncompressed. JPEG file sources are very bad as they contain block artifacts.
  • Try to acquire images that are as sharp as possible and don't contain motion blur.
  • Disable the code duplicate filter in the session configuration.
  • For SDK version 5.4 and earlier the recognition context implicitly switches between running full image localization and default scan area. To perform both strategies on an input image the process frame call has to be executed twice for each input image. This is no longer necessary for versions 5.5 or newer.