Design Article
PRODUCT HOW-TO: 2D Barcode Decoding Implementation on Low Footprint DSPs
Hazarathaiah Malepati and Yosi Stein
11/9/2009 10:55 PM EST
The 1D (one-dimensional) barcodes, which can only encode numeric data, played a major role in the last two decades in applications such as, product shipping and tracking, system security, supermarkets, etc. With 2D (two-dimensional) barcodes, the data are encoded in both the horizontal and vertical directions of the 2D symbol as shown in Figure 1 below.
The amount of data that can be contained in a single 2D symbol is significantly greater than that stored in a 1D symbol. 2D barcode solutions provide greater information density than conventional 1D barcodes particularly for applications that require encoding of explicit information rather than simple code information.
A few applications of 2D barcode technology include product labeling, product information tracking and checking, mobile security, immigration check services, healthcare, e-commerce, etc.
![]() |
| Figure 1: An example of a 2D barcode |
Many 2D barcode algorithms are available today which has resulted in a range of applications adopting different barcode technologies. In general, there are two types of 2D barcodes: 1) stacked 2D barcodes such as PDF417 and Code 49, and 2) matrix bar codes such as QR code and data matrix. In this article, we restrict our discussion to data matrix barcode technology [2].
2D Data Matrix Barcode Technology
A 2D Data Matrix barcode consists of black and white modules arranged in either a square or rectangular pattern as shown in Figure 1. The encoded data bits that are mapped to a region of black and white modules (or cells) is called a data region. For more details on different types of encoding schemes supported by 2D Data Matrix barcodes, refer [2].
The data region is surrounded by a finder pattern (the bottom and left hand sides of finder pattern contain only dark modules, whereas the top and right hand sides of finder pattern are comprised of alternative white and dark modules). The Data Matrix 2D barcode allows multiple data regions separated by the alignment patterns to hold more data information.
There are two versions of Data Matrix, one is based on the cyclic redundancy check (CRC) and convolutional error correction, and the other is based on Reed-Solomon (RS) error correction. With respect to scanning, reading, and extracting the data bits, there is no difference between CRC-based and RS-based Data Matrix decoding.
After extracting the data bits, the CRC-based decoding follows one path and the RS-based decoding follows another path, as the interleaving and error correction methods are different for the two cases.
![]() |
| Figure 2: Block diagram of 2D barcode scanner and processing DSP core |
Here we consider the emerging RS code-based 2D Data Matrix barcode decoding on a low footprint Blackfin processor. The block diagram of a 2D barcode scanner connected to the DSP processor through the PPI-DMA channel is shown in Figure 2, above.






Comments
andyneil
11/12/2009 5:32 AM EST
Note that it is not tue that 1D barcodes can only encode numeric data!
Some 1D barcode symbologies support only numeric data, but plenty of other well-established symbologies are available to encode letters and other characters...
Sign in to Reply