Optimize Scanning Performance
In this guide, you will learn how to optimize performance by adapting barcode capture to your use case.
Before you start…
To get the most out of this guide, we recommend that you first take a look at the following guides:
Restrict the Scanning Area
The Scandit Data Capture SDK allows to restrict the area of the screen in which it is looking for barcodes and entirely ignoring the area outside of it. This can significantly improve decoding speed (especially) on slower devices. While the Scandit Data Capture SDK usually takes into consideration the entire screen by default, it might not actually be needed for some use cases or the performance gain might be worth the loss of some convenience in the form of scan area.
Take a look at how to set up the active scan area for an in-depth explanation of what can be changed. Point your attention especially towards the section about margins and the RectangularLocationSelection for a high performance gain and RadiusLocationSelection for a lower but still relevant performance gain.
Optimizing for Scan Distance
The Scandit Data Capture SDK lets you choose from different resolutions ( HD , full HD, 4k) for the video feed. Increasing the resolution typically leads to better decoding range and reading of small elements. However, it can also result in a lower framerate as more pixels need to be processed. When optimizing for your use case, you should use the lowest resolution that allows for good reading performance.
The Scandit Data Capture SDK also allows to set a default zoom when opening the camera preview. This can be especially useful to read barcodes from further away, and is usually coupled with the usage of a higher resolution.
Note: 4k is currently unavailable on Android. If 4k is selected, full HD is used (if supported).
Restrict the Active Symbologies
The type of a barcode is referred to as its symbology, e.g QR Code or Code 128. The Scandit Data Capture SDK supports numerous such symbologies and they are all disabled by default. To enable scanning of a particular barcode, its symbology must be enabled. To optimize performance you should always make sure that only the symbologies that you actually want to scan are enabled as every additionally enabled symbology will decrease the scanning performance slightly.
On top of this each symbology has additional properties, such as the active symbol counts (which reflects the length of the barcode) or color of the barcode (bright on dark or dark on bright). To optimize performance you should enable only the properties you need for each symbology as otherwise unnecessary processing might slow down the scanning.