Improve the Barcode Recognition Speed of Your Application

How to improve barcode recognition speed

As a software developer, there might be times that your project or application has a need to read barcodes. Before you jump into a barcode reading SDK, you need to figure out quite a few things. A top item will no doubt be to improve barcode recognition accuracy. Also at the top of your list should be how to improve barcode reading speed. Without both of these elements being optimized, user frustration will reign supreme.

Most of us have experienced at a retail store how frustrating it is when the retail person cannot instantly read a barcode. So, you can imagine how frustrated a user might be if he/she had to wait a few seconds or longer to read one barcode amongst the hundreds or so needed that day. There are some important steps to take to speed the decoding of barcodes. We are going to introduce some of the most important ones, one by one, in this article.

To be noted, some solutions for improving accuracy crossover to improving speed. In other words, if you take care of one thing for accuracy, often you may find that it favors improving decoding speed. But still, there are some unique aspects to review in terms of decoding speed. So, let’s discover some of the key things you can do to improve barcode decoding speed.


The location of the barcode involves where it is physically located on a page, box or other item. In a typical scenario, software can be used to scan the entire width and height of a page, box, etc. in order to find a barcode. Part of having success in such a scan is having a properly defined quiet zone. Remember that quiet zone specifications vary depending on the barcode symbol being used. Usually, at least an eighth of an inch is a minimal requirement. A quiet zone is a blank area or margin on either end of a bar code. That blank area tells a barcode scanner where the barcode starts and stops.

In addition, if you can specify a quadrant or area as to where the barcode will always be this can also improve speed. For example, if you know barcodes will always be in a three-inch by three-inch box at the top right corner of an 8.5” x 11” page, you can set the barcode reader software to read only that area, without spending extra time scanning other parts of the page. Any good barcode reader software should allow this specification.

Maximum Number of Barcode and Pages

Your barcode reader software should also allow for parameters that define how many barcodes on a page will be scanned or how many pages need scanning per document. For example, let’s say you have a five-page document with two barcodes and the barcodes are on pages two and three. Being able to specify in your software to stop scanning after so many barcodes or so many pages can dramatically improve speed. This is compounded as the number of documents you have grows. So, you should also be able to make the software not scan past page three of five or after the second barcode is finished. You can also set this on a per page-basis, such as if the barcodes scanned in a page has hit the maximum number of barcodes allowed.

Scan Distance

Here’s a quick point about scan distance. For 1D barcodes, scan distance is also important as it can impact barcode recognition in that you may scan unwanted pixels. For example, the number “1” on a page, whether part of a text in a sentence or part of a barcode symbol, may be confused for a bar depending on its location and the scan distance. Thus, it is ideal to set a scan distance of five pixels or more for optimal decoding speed and accuracy. Generally, the higher scan distance (more than five) you can set the more optimal speed will become.


Multithreading refers to running more than one thread of execution for a task (a program, or a process) within an operating system. Each request for the task is kept track of as a thread with a separate identity. The requests are processed in parallel in multi-cores or multiprocessors. Given that multi-core CPUs are so common now (as shown in the figure below), it’s important for a software application to process information in an asynchronous fashion. In this way, a piece of software can utilize multithreading to speed things up without wasting your processor’s computing capability.

The rise of multi-core microprocessors


So, if you are looking to use a barcode processing SDK, you should check if it can take advantage of multi-threading capabilities. You can base how to control multithreading by measuring and predicting how you process barcode images. You can optimize this part for your particular workflow with some experimentation. Essentially, you need to figure out which part of the operations can be performed in parallel and which parts must be serialized. Then you can use multithreading in combination with a best practice of controlling the number of activities performed. Overall, leveraging multi-threading capabilities is one behind-the-scenes method to noticeably improve barcode recognition speed.

Barcode Types

Many organizations still leverage the original 1D (linear) barcode. Its limits in character capacity, or the limited information it can hold, actually helps improve barcode reading speed. But, today many organizations have requirements for more information than 1D barcodes can muster. Thus, 2D barcodes came about and brought advanced features. They offer much higher data density, error correction, encryption technology, and they can encode images and multiple types of characters.

Three 2D barcode types are arguably now the most popular. We’ve highlighted them before and we should look at them a bit closer now too for their characteristics that can contribute to speed. They are the Quick Response Code (QR Code), PDF417 and Data Matrix. Each of these provides their own advantages. As a result, each is used for varying purposes. As we’ve mentioned, the amount of data one holds impacts speed. So, choose wisely.

QR Code example

QR Code

The QR Code is a type of matrix barcode. These are the ones you see nowadays with a series of black and white cells rather than the more traditional black lines, or bars. They really rose in popularity with mobile devices. It was initially developed by Toyota subsidiary Denso in September 1994. It’s currently defined in the standard ISO/IEC 18004. The QR Code was designed to allow high-speed component scanning. A CCD barcode reader can decode up to 30 QR Codes per second with up to 100 characters in each barcode.

QR Code example


The PDF417 barcode is a type of stacked linear barcode. Symbol Technologies was said to have developed this barcode type back in 1991. Today, it is represented by ISO standard 15438. Each PDF417 barcode consists of three to 90 rows and a single row is essentially the equivalent of a small 1D barcode. PDF417 specifies that each pattern in the code consists of four bars and spaces, and each pattern is to be 17 units long. This is how we get the “417” part of the name.

QR Code example

Data Matrix

Third on our list is the Data Matrix barcode type. This type of barcode is also a two-dimensional matrix barcode. It first came about in 1994 and today it is represented by the standard ISO/IEC 16022. The Data Matrix barcode, especially the latest ECC200 version, supports advanced encoding error checking and correction algorithms. This allows the recognition of barcodes that are up to 60 percent damaged. So it’s commonly used on items where barcodes get easily damaged due to high heat, chemical exposure, etc. So, Data Matrix barcodes are used in electrical rating plates, surgical instruments, circuit boards, and the like.

Whatever barcode you select, try to opt for one that will handle the amount of information you need while also being the most suitable for scanning simplicity. For example, using a large barcode that wraps around an entire bottle is obviously going to make it difficult to scan compared to a smaller one.

Barcode Direction and Rotation

As you can imagine, specifying the direction your barcodes will be in when decoded can increase speed. This is because the software doesn’t have to account for multiple orientations to look for. For example, if you can specify in your application that barcode orientations will always be horizontal, as opposed to vertical, speed will be nominally improved. For further orientation-related speed improvements, you’ll want to avoid as much as possible having to process a barcode. One example of having to process a barcode is to deskew it. Another might be needing to smooth it. These are two of many examples of processing that impact both recognition accuracy – as we covered before – and speed.


To deskew a barcode means to essentially straighten it out. When a barcode is skewed, depending on the angle and how skewed it is, the individual barcodes can appear thicker or thinner than normal. So, when deskewing occurs, it can actually worsen things. Also, deskewing almost always reduces the image quality, which can result in reduced barcode recognition speed and accuracy. Again, you can use pre-processing features in an SDK like Dynamsoft’s Barcode Reader, to auto-deskew barcodes while maximizing their recognition accuracy. Regardless, having to deskew will take time and anything that takes time drops speed.

Before deskew

Before deskew

After deskew

After deskew


Another related process that can impact decoding speed is when you have to smooth the barcode. This can essentially add resolution and is ideally used with barcodes lacking pixel density. Think of a barcode that is perhaps heavily faded. It would make sense to darken it. But, this isn’t just about duplicating pixels to darken it as often this can negatively impact barcode recognition. Smoothing a barcode that is lacking in contrast or pixel density must be done intelligently and an appropriate zoom level should be employed in a barcode reader SDK. So, you can imagine that whenever smoothing is implemented, speed is sacrificed. Just as you want to avoid deskewing, you’ll want to avoid smoothing too.

Before smooth-zoom

Before smooth-zoom

After smooth-zoom

After smooth-zoom

There are cases where deskewing and smoothing are just part of the operations for a specific application. In other words, it’s the nature of the business. In such cases, being able to deskew and smooth will actually help speed operations. However, in most cases, avoiding post-processing mechanisms is an ideal path to speedier decoding.


Barcode recognition accuracy and speed go hand-in-hand. Often, when developers (or end users) optimize for one, they’ll help improve the other. And, in general, avoiding processing of barcodes is ideal to optimizing decode speed. We touched on the use of barcode reader software that takes advantage of multi-threading to more speedily process barcodes too. You also need to consider the barcode types you’ll use. Picking the right barcode for the right application (how well the printed barcode fits, etc.) helps ensure faster decoding. Also, specifying the direction (or orientation) your barcodes will be in when decoded can increase speed.

Being able to specify how many barcodes and pages also matters to speed just as does being able to specify where on a page a barcode will be. Your software should be able to handle such specifications. Finally, you must also consider the scan distance. Generally, you want to at least have a scan distance of five pixels while often more than five will help improve speed.

Your barcode scanner hardware reads barcodes in milliseconds. So, you can guess by now that the simpler you can make a single decoding event, the faster it can occur. Such simplicity is found in eliminating steps. This can include implementing key steps such as, lessening the need to recreate a bad barcode, minimizing scan areas, decreasing the need for processing to decode a barcode, and more. If you can eliminate many of these extra steps, you’ll get that extra decoding speed you’re looking for.



Notable Solutions


Nano Scientific Research Center

Pegasus Imaging


Subscribe Newsletter

Subscribe to our mailing list to get the monthly update.