How Are Barcodes and QR Codes Read?
From lines and squares to numbers: writing that machines read
Summary
A barcode writes digits as black bars and white gaps of different widths. The scanner at the checkout passes a light across the barcode: the black bars absorb the light, the white ones reflect it, and the sensor works out the digits by measuring the widths of the bars from this change. The last digit is a check digit that catches misreadings. A QR code writes information into a two-dimensional square grid; the three big squares in its corners let the camera find the code, and thanks to the error-correction information added to it, the code can be read even if part of it is damaged.
In depth
The EAN-13 barcode on shop products writes 13 digits into 95 stripes of equal width. Each digit is a 7-stripe pattern made of 2 black and 2 white bars. The first digit is not written as bars; it is worked out from which family of patterns (L or G) the six left digits are written in. The last digit is a check digit calculated from a weighted sum of the others. The QR code was developed at Denso Wave in 1994. Finder squares, timing lines and format information let the camera find the code and work out its grid. Reed–Solomon error-correction bytes, also used on CDs and by space probes, are added to the data bytes; at the highest level the data can be recovered even if about 30% of the code is damaged.


Rate How Are Barcodes and QR Codes Read?
What did you think of this content? Click the stars to leave your rating.
Leave a Comment and Rating
Sign in to comment and rate. Membership is free.