QR code

type of matrix barcode (trademarked name)

A QR code (quick-response code) is a type of two-dimensional matrix barcode. Japanese company Denso Wave invented it in 1994 for labelling automobile parts.[1][2]

A QR code for the URL of the English Wikipedia Mobile main page

A QR code has a square, which contains other elements. There are black squares. These are arranged in a grid. Some of the parts are not filled, usually they are white. Some parts of the code are markers. These markers help with reading and decoding the information. Usually, the code is read by an imaging device, such as a camera. The information in the image is then decoded.

QR codes have Reed–Solomon error correction. This means that even if parts of the code cannot be decoded, or they are wrong, the code can still be used.

The required data are then extracted from patterns that are present in both the horizontal and the vertical components of the QR image.[3]

Information types

change

In many ways, QR codes are similar to barcodes. They can hold more information, and they also can hold different types of information:[4]

  • Numeric information: they can store numbers
  • Alphanumeric information: They can store letters
  • Binary information: Raw data
  • Kanji

Compared to the standard barcodes, QR codes were also used for other things than labelling car parts because the image can be read more quickly, and because more information can be stored. Applications include product tracking, identifying an item, tracking time, document management, and general marketing.[3]


Information capacity

change

The amount of data that can be represented by a QR code symbol depends on the data type (mode, or input character set), version (1, ..., 40, indicating the overall dimensions of the symbol, i.e. 4 × version number + 17 dots on each side), and error correction level. The maximum storage capacities occur for version 40 and error correction level L (low), denoted by 40-L:[5][6]

Maximum character storage capacity (40-L)
Character refers to individual values of the input mode (data type).
Input mode Max. characters Bits/char. Possible characters, default encoding
Numeric only 7,089 3​13 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Alphanumeric 4,296 5​12 0–9, A–Z (upper-case only), space, $, %, *, +, -, ., /, :
Binary/byte 2,953 8 ISO/IEC 8859-1
Kanji/kana 1,817 13 Shift JIS X 0208

Here are some samples of QR codes:

Error correction

change
 
Damaged but still decodable QR code, link to http://en.m.wikipedia.org
 
Example of a QR code with artistic embellishment that will still scan correctly thanks to error correction

QR codes use Reed–Solomon error correction. There are different levels, depening on the level, with between 7% and 30% of the data bytes missing, the code can still be read correctly:

Level L (Low) 7% of data bytes can be restored.
Level M (Medium) 15% of data bytes can be restored.
Level Q (Quartile)[7] 25% of data bytes can be restored.
Level H (High) 30% of data bytes can be restored.

In larger QR symbols, the message is broken up into several Reed–Solomon code blocks. The block size is chosen so that no attempt is made at correcting more than 15 errors per block; this limits the complexity of the decoding algorithm. The code blocks are then interleaved together, making it less likely that localized damage to a QR symbol will overwhelm the capacity of any single block.

Dangers

change

Even though they are very useful, QR codes also have dangers: The information in the code is not human-readable. A QR code can therefore contain a link to a website which contains malware. If it is read on a smartphone, the QR code can run applications on the smartphone, or activate certain functions on the smartphone. This is a problem of all 2D-barcodes, and is not specific to QR codes.

An attack done using such QR codes, called "tags", is often called "Atagging". In 2010, there was such an attack for Android: the QR code pointed to a website that allowed to download the software ICQ; which was infected with a trojan horse, Trojan-SMS.AndroidOS.Jifake.f, This trojan sent several SMS to a premium-rate Russian service-provider.

To protect against such attacks, many apps to decode QR code display the decoded information; and the user has to actively click to open the website.

Extensions

change

There are different extensions to the QR code:

  • Design QR code: As there is error correction, parts of the code can be used for an image or a logo, and the code will still work as it should
  • Micro QR code: This is a variant that is optimized to be very small .. It looks slighlty different, but can still encode up to 35 digits or 21 alphanumeric characters.
  • Secure QR code: It allows to encrypt part or all of the data. QR code reeaders can decode the non-encrypted part, to read the encrypted part a special reader is needed, and a key must be entered in the reader.
  • iQR code: The code doesn't have to be on a square, but can also be on a rectangle. This makes it possible to use it on curved surfaces, for example.
  • Frame QR: A frame contains a QR code, the part in the center can be freely used, for an image, or similar.

References

change
  1. Hung, Shih-Hsuan; Yao, Chih-Yuan; Fang, Yu-Jen; Tan, Ping; Lee, RuenRone; Sheffer, Alla; Chu, Hung-Kuo (2020-09-01). "Micrography QR Codes". IEEE Transactions on Visualization and Computer Graphics. 26 (9): 2834–2847. doi:10.1109/TVCG.2019.2896895. ISSN 1077-2626. PMID 30716038. Archived from the original on 21 April 2021. Retrieved 21 April 2021.
  2. Chen, Rongjun; Yu, Yongxing; Xu, Xiansheng; Wang, Leijun; Zhao, Huimin; Tan, Hong-Zhou (2019-12-11). "Adaptive Binarization of QR Code Images for Fast Automatic Sorting in Warehouse Systems". Sensors. 19 (24): 5466. Bibcode:2019Senso..19.5466C. doi:10.3390/s19245466. PMC 6960674. PMID 31835866.
  3. 3.0 3.1 "QR Code Essentials". Denso ADC. 2011. Archived from the original on 12 May 2013. Retrieved 12 March 2013.
  4. "QR Code features". Denso-Wave. Archived from the original on 2013-01-29. Retrieved 3 October 2011.
  5. "QR Code—About 2D Code". Denso-Wave. Archived from the original on 5 June 2016. Retrieved 27 May 2016.
  6. "Information capacity and versions of QR Code". Denso-Wave. Archived from the original on 29 May 2016.
  7. "2D Barcode: QR-Code". Archived from the original on 2012-09-15. — TEC-IT