Fast Mobile Barcode Scanner SDK

Mobile devices have undoubtedly become indispensable parts of our lives, but more and more they are assets used to perform daily job functions. Across many industries such as healthcare and postal services, workers rely on their phones and tablets to scan barcodes, track inventory, store and lookup records in databases, communicate with dispatchers, and so on. For these cases, like many others, speed and accuracy are imperative.

In this post, we are introducing two new features available with Dynamsoft Barcode Reader 7.0 that greatly improve the experience of mobile video barcode scanning.

  • Scan Directly ⁠— improves barcode reading speed for high-quality images, which saves companies time and money. We tested that on average it improves the decoding speed by 20%.
  • Frame Decoding ⁠— makes video decoding more responsive and improves user experience. Several new interfaces are introduced for video scanning.

Update: Version 7.x further improved the performance by automatically filtering out blurry frames. 

Download Dynamsoft Barcode Reader SDK 30-Day Free Trial

Scan Directly Mode Improves Mobile Barcode Scanning Speed

With the scan directly mode, the barcode reader SDK doesn’t perform any pre-localization to identify barcode regions. Instead, it treats the entire image as a barcode zone and starts scanning for possible barcode patterns line by line. Once a recognizable barcode pattern is detected, it starts the decoding process in the region of interest. This feature works best under interactive user scenarios where a user holds a mobile device that points to a barcode for scanning.


This mode works great for all 1D and 2D barcode types except for DataMatrix because the module size tends to be smaller than other symbologies. One drawback with this mode is working with small, or severely damaged barcodes. In such cases, the barcode may be missed.

Frame Decoding Improves Mobile Barcode Scanning User Experience

To improve mobile barcode scanning user experience, we have created three threads:

  • User Main Thread
  • Decoding Thread
  • Result Consumer Threaddbr-workflow

User Main Thread

The user main thread is initiated when StartFrameDecoding/StartFrameDecodingEx is being called. AppendFrame adds barcode images to the FrameQueue which contains a list of images that are waiting to be decoded.

Decoding Thread

One important parameter here is maxQueueLength, which is used to control the responsiveness of video decoding given a particular frame acquisition rate. If the current number of frames is larger than the maxQueueLength then the current frame in the decoding process will be discarded. In such an event, it uses another frame in the FrameQueue to begin decoding. This ensures a responsive video decoding experience and avoids lagging.

Result Consumer Thread

A third thread is created for Result fetching. This is where the decoding process has finished and the decoded text is ready for fetching.

How to Set Frame Acquisition Interval 

For example, if the maxQueueLength is set to 3, and the frame acquisition interval is set to 100ms, then a new frame is sent to the FrameQueue every 100ms. On average, if each frame takes 200ms to decode, then after a few hundred milliseconds the FrameQueue will have accumulated more than 3 frames waiting to be decoded. Then the 2nd decoding thread will discard the current frame and start processing the next image in the FrameQueue to keep the FrameQueue image count under 3. The frame acquisition interval and the maxQueueLength needs to be set appropriately to maximize the benefit of frame decoding for the best user experience.

Take the Next Step

Download Dynamsoft Barcode Reader SDK 30-Day Free Trial. If you have any questions, please contact our Support Team.