The QR code was inspired by the board game Go and invented for car parts.
In 1994 a team at the Japanese firm Denso Wave, led by Masahiro Hara, needed a better way to track car parts than rows of barcodes. Their design drew on black and white stones on a Go board. The code can survive scratches, smudges and even a logo in the middle, thanks to clever error-correcting maths.
Before QR codes, each box of car parts might carry several separate barcodes, each scanned in turn. Denso Wave wanted one label that could hold all that data, including Japanese characters. Masahiro Hara's team came up with a two-dimensional grid of black and white squares, influenced by the counters of the board game Go, and called it Quick Response.
The three large squares in the corners are the secret to reading it fast from any angle. Each is a set of nested squares whose black and white bands run in the ratio 1:1:3:1:1. The team chose that pattern after searching printed material for the sequence least likely to appear by accident, so a camera can find the corners instantly and work out the code's size, rotation and tilt. A smaller square near the fourth corner helps correct for skew.
The data itself is protected by Reed–Solomon error correction, the same family of maths used on CDs. Extra bytes are added so that missing or damaged parts can be reconstructed. There are four levels; more protection means less room for data. This is why designers can put colours or a logo into a QR code: the decoration is simply treated as damage and corrected away. Codes come in 40 sizes, from 21 by 21 modules upwards.
The technology is freely licensed to anyone who follows the published ISO or Japanese standards. That openness helped QR codes escape the factory: onto posters, tickets, payment systems and restaurant tables. In 2008 a Japanese stonemason even announced plans to engrave them on gravestones.
Source: Wikipedia — QR code · Text summarised from Wikipedia (CC BY-SA 4.0)