Barcode Recognition 101: How to Decode QR Code, DataMatrix and PDF417?

How 2D Barcode Recognition Works

Wanna understand how a barcode recognition scanner interprets a 2D barcode? We’ve worked out an infographic to get you started. You might also be interested in how to decode 1D barcodes.

Step 1. Location

In this step, the barcode scanner tries to find the barcodes if there is any. Different barcode symbologies have different recognition patterns.

QR Code – Distinct square “targets” in three of the four corners. The “missing” fourth target also indicates the correct orientation for the QR code

DataMatrix – distinct pattern of solid lines on the left and bottom edges, along with alternating filled and empty boxes (called modules) along the top and right edges

PDF417 – start and end patterns include several vertical bars

Step 2. Decoding

In this step, the barcode reader API tries to interpret patterns of the black/white modules based on that code type’s specifications. Besides the barcode information, which is typically a combination of numeral or character, the 2D barcode usually contains some part of redundant data.

The encoded value is built like stacks of codewords, as you can find in the below infographic.

2D Barcode recognition basis

Subscribe Newsletter

Subscribe to our mailing list to get the monthly update.

Subscribename@email.com