7 minutes till you become a Quick Response(QR) Codes Expert

shivak singh
8 min readDec 11, 2023

In 1994 Masahiro Hara, a Japanese engineer, in collaboration with the company Denso Wave replaced one-dimensional bar codes with two-dimensional bar codes. Then the question comes:

Why QR code?

  • High-capacity data encoding
    — While conventional bar codes can store a maximum of approximately 20 digits, QR codes can handle several dozen to several hundred times more information.
    — QR codes can handle all data types, such as numeric and alphabetic characters, Kanji, Kana, Hiragana, symbols, binary, and control codes. Up to 7,089 characters can be encoded in one symbol.
  • Small printout size
    — QR Code carries information both horizontally and vertically, it is capable of encoding the same amount of data in approximately one-tenth the space of a traditional barcode
    — Did you know micro QR codes can be printed using any generic printer?
  • Kanji and Kana capability
  • Dirt and damage-resistant
    — QR Code has error correction capability.
    — Data can be restored even if the symbol is partially dirty or damaged.
    — A maximum of 30% of QR code words can be restored
    — — One codeword is equal to 8 bits.
    — — Data restoration may not be fully performed depending on the amount of dirt or damage.
  • Readable from any direction in 360 degrees
    — QR Code is capable of 360-degree (omnidirectional), high-speed reading.
    — QR Code accomplishes this task through position detection patterns located at the three corners of the symbol.
    — These position detection patterns guarantee a stable high-speed reading, circumventing the negative effects of background interference.
  • Structured appending feature
    — QR Codes can be divided into multiple data areas. Conversely, information stored in multiple QR Code symbols can be reconstructed as a single data symbol.
    — One data symbol can be divided into up to 16 symbols, allowing printing in a narrow area.

What is the information capacity of QR codes?

  • The symbol versions of the QR Code range from Version 1 to Version 40.
    — Each version has a different module configuration or number of modules.
    — The module refers to the black and white dots that make up the QR Code
  • “Module configuration” refers to the number of modules contained in a symbol, commencing with Version 1 (21 × 21 modules) up to Version 40 (177 × 177 modules).
    — Each higher version number comprises 4 additional modules per side.
  • Each QR Code symbol version has the maximum data capacity according to the amount of data, character type and error correction level.
    — In other words, as the amount of data increases, more modules are required to comprise the QR Code, resulting in larger QR Code symbols.

How to determine the version of the QR code?

  • Suppose the data to be input consists of 100-digit numerals. This can be achieved by following the steps described below:
    — Choose “numeral” as the type of input data.
    — Choose a data correction level from the alternatives of L(7%), M(15%), Q(25%) and H(30%). (M is assumed here.)
    — Find a figure in the table, 100 or over and the closest to 100 that is at the intersection with a correction level M row.
    — The number of the version row that contains this figure is the most appropriate version number

What error correction to choose?

  • QR Code has an error correction capability to restore data if the code is dirty or damaged.
  • Four error correction levels are available for users to choose from according to the operating environment.
  • Raising this level improves error correction capability but also increases the amount of data (QR Code size).
  • Level H (30%) or Q (25%) may be selected for a factory environment where QR codes get dirty
  • Level L (7%) may be selected for a clean environment with a large amount of data.
  • Typically, Level M (15%) is most frequently selected.

How does Error Correction work?

  • The QR Code error correction feature is implemented by adding a Reed-Solomon Code* to the original data.
  • The error correction capability depends on the amount of data to be corrected. For example,
    — if there are 100 codewords of QR Code to be encoded and 50 of which need to be corrected,
    — 100 codewords of Reed-Solomon Code are required, as Reed-Solomon Code requires twice the amount of codewords to be corrected
    — So the total codewords are 200, 50 of which can be corrected
    — Thus, the error correction rate for the total codewords is 25% (Level Q)
  • Not only QR Code content but Reed-Solomon Code content is susceptible to dirt and damage
    — Therefore an error correction of 25% means 50% damage coverage
  • Reed-Solomon Code is a mathematical error correction method used for music CDs/DVDs etc.
    — The technology was originally developed as a measure against communication noise for artificial satellites and planetary probes.
    — It is capable of correcting the byte level and is suitable for concentrated burst errors

Is QR Code technology Patented?

  • For standardised QR Codes, DENSO WAVE has waived the rights to a patent in its possession (Patent №2938338)

How to obtain QR Code specifications?

  • QR Code is established as an ISO (ISO/IEC18004) standard. QR Code specification can, therefore, be purchased from https://www.iso.org/home.html
  • QR Code outline specification

What are various types of QR Codes?

  • QR Codes
    — Model 1:
    Capable of coding 1,167 numerals with its maximum version being 14 (73 x 73 modules)
    — Model 2:
    Was created by improving Model 1 so that this code can be read smoothly even if it is distorted somehow.
    — — QR Codes printed on a curved surface or whose reading images are distorted due to the reading angle can be read efficiently by referring to an alignment pattern embedded in them.
    — — This code can encode up to 7,089 numerals with its maximum version being 40 (177 x 177 modules)
  • Micro QR Codes
    It has only one position detection pattern, compared with a regular QR Code that requires a certain amount of area because position detection patterns are located at the three corners of a symbol.
    — Furthermore, it requires at least a four-module wide margin around a symbol, whereas a two-module wide margin is enough for a Micro QR Code. This configuration of Micro QR Code allows printing in areas even smaller than QR Code
  • rMQR Code
    — Rectangular for long narrow margins
    — Large capacity (76 digits)
    — Rapid scanning
  • SQRC
    — A single QR Code can carry public data and private data.
    — The private data can be read only with a dedicated reader having the cryptographic key, which provides data protection.
    — Since SQRC looks the same as the regular QR Code, it can prevent forgery and tampering
  • Frame QR
    — This code has an area, or a frame, for holding an image.
    — The shape and colour of the frame can be changed flexibly, and the code has a variety of applications
    — We want to integrate a QR Code and an illustration

How to determine the right QR code?

  • Module size
    — Once a symbol version is determined, the actual size of the QR Code symbol depends on the millimetre size of the module (one square area comprising the QR Code) to be printed.
    — The larger the module is, the more stable and easier to read with a QR Code scanner it becomes.
  • Printer Head Density and Module Size
    — The module size of a standard thermal transfer/direct thermal printer depends on the number of dots in the printer head.*
    — For example, if the head density is 300dpi and each module is made up of 5 dots, the module size is 0.42 mm/module.
    — — Increasing the number of dots improves the printing quality, eliminates printing width or paper feed speed fluctuations, distortion of axis, blurring, etc, and enables more stable operations.
    — — DENSO WAVE recommends for stable operations that each module is made up of 4 or more dots.
  • Size of module that can be read by scanners
    — Each scanner has its readable module size limit. The scanner resolution represents this limit.
    — For example, if a QR Code symbol is printed with a 600 dpi, 4-dot printer, the module size is 0.17mm. A scanner resolution of less than 0.17mm is required to read the symbol.
    — — Small printing in a limited area with a higher head density printer can be useless if the reading limit of the scanner is exceeded.
    — Consider the scanner to be adopted before determining the module size to be used.
  • Scanning distance
    — QR code size = Scanning distance/10
    — Total size = QR code size + Quite a zone (0.15 x QR Code size)
    — QR code size is independent of the amount of data being stored
  • Print Quality
    — 100 DPI
    — Normal printers can print up to 300 DPIs

What are the common reasons for QR code read errors?

  • QR Code module distortion
    — When a QR Code is enlarged or made smaller using an image processing tool or the like, every module becomes distorted.
    — It may look like a normal QR Code, but it may be difficult or impossible to read the code
  • Overlaid letters and pictures
    — If you place letters or pictures on an area overlapping a QR Code, the contrast between the bright and dark areas becomes indistinct

How to create QR codes?

  • QR codes are a public-domain technology
  • There are no license restrictions or costs associated with their use
  • Both paid and unpaid libraries can be used to generate QR codes

Credits: https://www.qrcode.com/en/index.html

If you enjoyed this poem help others find it by holding the 👏 button until the heavens drop. You can give up to 50 👏

--

--