FazBrowse Wikipedia Viewer | Main Page |
Search Wikipedia:
|
Viewing: https://en.wikipedia.org/wiki/QR_code#Encoding

QR code

Contents
History
    COVID-19 pandemic
Adoption
Uses
    Error correction
Standards
Variants
    Model 1
    Frame QR

History

Demo of printing a QR code

The QR code system was invented in 1994, at the Denso Wave automotive products company in Japan. The initial alternating-square design presented by the team of researchers, headed by Masahiro Hara, was influenced by the black and white stones played on a Go board; the pattern of the position detection markers was determined by finding the least-used sequence of alternating black-white areas on printed matter, which was found to be (1:1:3:1:1). The functional purpose of the QR code system was to facilitate keeping track of the types and numbers of automobile parts, by replacing individually-scanned bar-code labels on each box of auto parts with a single label that contained the data of each label. The quadrangular configuration of the QR code system consolidated the data of the various bar-code labels with kanji, kana, and alphanumeric codes printed onto a single label.

COVID-19 pandemic

Two QR codes that link to German contact tracing app check-ins during the COVID-19 pandemic

After the COVID-19 pandemic began spreading, QR codes began to be used as a "touchless" system to display information, show menus, or provide updated consumer information, especially in the hospitality industry. Restaurants replaced paper or laminated plastic menus with QR code decals on the table, which opened an online version of the menu. This prevented the need to dispose of single-use paper menus, or institute cleaning and sanitizing procedures for permanent menus after each use. Local television stations utilized codes on local newscasts to allow viewers quicker access to stories or information involving the pandemic, including testing and immunization scheduling websites, or for links within stories mentioned in the newscasts overall. This shift also prompted discussion about digital access, as reliance on QR codes assumes the availability of smartphones, internet connectivity, and digital literacy, which may exclude some users.

In Australia, patrons were required to scan QR codes at shops, clubs, supermarkets, and other service and retail establishments on entry to assist contact tracing. Singapore, Taiwan, the United Kingdom, and New Zealand used similar systems.

QR codes were also present on COVID-19 vaccination certificates in places such as Canada and the EU (EU Digital COVID certificate), where they could be scanned to verify the information on the certificate.

Adoption

A QR code being painted on the side of a buildingQR codes can be displayed on buildings, such as this one being painted in Cape Town.

During June 2011, 14 million American mobile users scanned a QR code or a barcode. Some 58% of those users scanned a QR or barcode from their homes, while 39% scanned from retail stores; 53% of the 14 million users were men between the ages of 18 and 34.

In developing countries including China, India QR code payment is a very popular and convenient method of making payments. Since Alipay designed a QR code payment method in 2011, mobile payment has been quickly adopted in China. As of 2018, around 83% of all payments were made via mobile payment.

In September 2020, a survey found that 18.8 percent of consumers in the United States and the United Kingdom strongly agreed that they had noticed an increase in QR code use since the then-active COVID-19-related restrictions had begun several months prior.

In 2022, 89 million people in the United States scanned a QR code using their mobile devices, up by 26 percent compared to 2020. The majority of QR code users used them to make payments or to access product and menu information.

There are many QR code generators available as software or as online tools that are either free or require a paid subscription. The QR code has become one of the most-used types of two-dimensional code. Microsoft Office and LibreOffice have a functionality to insert QR code into documents. Google had an API, now deprecated, to generate QR codes, and apps for scanning QR codes can be found on nearly all smartphone devices.

Different studies have been conducted to assess the effectiveness of QR codes as a means of conveying labelling information and their use as part of a food traceability system. In a field experiment, it was found that when provided free access to a smartphone with a QR code scanning app, 52.6% of participants would use it to access labelling information. A study made in South Korea showed that consumers appreciate QR codes used in the food traceability system, as they provide detailed information about food, as well as information that helps them in their purchasing decision.

Uses

Although initially used to track parts in vehicle manufacturing, QR codes are used over a much wider range of applications. These include commercial tracking, warehouse stock control, entertainment and transport ticketing, product and loyalty marketing, and in-store product labeling.

  • Version 1 (21×21). Content:
    Version 1 (21×21). Content: "Ver1".
  • Version 2 (25×25). Content:
    Version 2 (25×25). Content: "Version 2".
  • Version 3 (29×29). Content:
    Version 3 (29×29). Content: "Version 3 QR Code".
  • Version 4 (33×33). Content:
    Version 4 (33×33). Content: "Version 4 QR Code, up to 50 char".
  • Version 10 (57×57). Content:
    Version 10 (57×57). Content: "VERSION 10 QR CODE, UP TO 174 CHAR AT H LEVEL, WITH 57X57 MODULES AND PLENTY OF ERROR CORRECTION TO GO AROUND. NOTE THAT THERE ARE ADDITIONAL TRACKING BOXES"
  • Version 25 (117×117). Content: 1,269 characters of ASCII text describing QR codes.
    Version 25 (117×117). Content: 1,269 characters of ASCII text describing QR codes.
  • Version 40 (177×177). Content:
    Version 40 (177×177). Content: "Version 40 QR Code can contain up to 1852 chars ..." (and followed by four paragraphs of ASCII text describing QR codes).
  • Error correction

    Damaged, torn, and dirty QR code that still scans correctly (linking to b7b6b5b4b3b2b1b0 with a standard numerical value α∈𝔽256 is taken to be a primitive element satisfying 1000111012), with initial root = 0 to obtain generator polynomials.

    The Reed–Solomon code uses one of 37 different generator polynomials over n are specific to the QR standard.

    For example, the generator polynomial used for the Version 1 QR code (21×21), when 7 error correction bytes are used, is: 𝔽256), as: n, of the polynomial) determines the number of error correction bytes. In this case, the degree is 7.

    When discussing the Reed–Solomon code phase there is some risk for confusion, in that the QR ISO/IEC standard uses the term codeword for the elements of p=1,2, or 3) strictly for error detection to prevent false-positive misreads; in Version 1-L (GF(2) is used, having the generator polynomial

  • Meaning of format information. In the above figure, the format information is protected by a (15,5) BCH code, which can correct up to 3 bit errors. The total length of the code is 15 bits, of which 5 are data bits (2 EC level + 3 mask pattern) and 10 are extra bits for error correction. The format mask pattern for these 15 bits is: [101010000010010]. Note that we map the masked values directly to their meaning here, in contrast to image 4
    Meaning of format information. In the above figure, the format information is protected by a (15,5) BCH code, which can correct up to 3 bit errors. The total length of the code is 15 bits, of which 5 are data bits (2 EC level + 3 mask pattern) and 10 are extra bits for error correction. The format mask pattern for these 15 bits is: [101010000010010]. Note that we map the masked values directly to their meaning here, in contrast to image 4 "Levels & Masks" where the mask pattern numbers are the result of putting the 3rd to 5th mask bit, [101], over the 3rd to 5th format info bit of the QR code.
  • Message placement within a Ver 1 QR symbol (21×21). The message is encoded using a (255,248) Reed Solomon code (shortened to (26,19) code by using
    Message placement within a Ver 1 QR symbol (21×21). The message is encoded using a (255,248) Reed Solomon code (shortened to (26,19) code by using "padding") that can correct up to 2-byte errors. A total of 26 code-words consist of 7 error-correction bytes and 17 data bytes, in addition to the "Len" (8 bit field), "Enc" (4 bit field), and "End" (4 bit field). The symbol is capable of level L error correction. The EC level is 01(L), and the mask pattern is 001. Hence the first 5 bits of the format information are 01001 (without the format mask). After masking, the 5 bits become 11100, as seen here.
  • Larger symbol (Ver 3, 29×29) illustrating interleaved blocks. The message has 26 data bytes and is encoded using two Reed-Solomon code blocks. Each block is a (255,233) Reed Solomon code (shortened to a (35,13) code), which can correct up to 11-byte errors in a single burst, containing 13 data bytes and 22 error-correction bytes appended to the data bytes. The two 35-byte Reed-Solomon code blocks are interleaved (resulting in a total of 70 code bytes), so it can correct up to 22-byte errors. The symbol achieves level H error correction.
    Larger symbol (Ver 3, 29×29) illustrating interleaved blocks. The message has 26 data bytes and is encoded using two Reed-Solomon code blocks. Each block is a (255,233) Reed Solomon code (shortened to a (35,13) code), which can correct up to 11-byte errors in a single burst, containing 13 data bytes and 22 error-correction bytes appended to the data bytes. The two 35-byte Reed-Solomon code blocks are interleaved (resulting in a total of 70 code bytes), so it can correct up to 22-byte errors. The symbol achieves level H error correction.
  • The general structure of a QR encoding is as a sequence of 4-bit indicators with payload length dependent on the indicator mode (e.g. byte encoding payload length is dependent on the first byte).


    Encoding modes
    Mode indicatorDescription MeaningTypical structure '[ type : sizes in bits ]'
    1 = 0b0001Numeric Numeric encoding (10 bits per 3 digits)[0001 : 4] [ Character Count Indicator : variable ] [ Data Bit Stream : 3[ Mode Indicator][ Mode bitstream ] --> [ Mode Indicator][ Mode bitstream ] --> etc... --> [ 0000 End of message (Terminator) ]

    After every indicator that selects an encoding mode is a length field that tells how many characters are encoded in that mode. The number of bits in the length field depends on the encoding and the symbol version.

    Number of bits in a length field (Character Count Indicator)
    EncodingVer. 1–910–2627–40
    Numeric 101214
    Alphanumeric 91113
    Byte 81616
    Kanji 81012

    Alphanumeric encoding mode stores a message more compactly than the byte mode can, but cannot store lowercase letters and has only a limited selection of punctuation marks, which are sufficient for rudimentary web addresses. Two characters are coded in an 11-bit value by this formula:

    V = 45 × C1 + C2

    This has the exception that the last character in an alphanumeric string with an odd length is read as a 6-bit value instead.

    Alphanumeric character codes
    CodeCharacterCodeCharacterCodeCharacterCodeCharacterCodeCharacter
    00009918I27R36Space
    01110A19J28S37$
    02211B20K29T38%
    03312C21L30U39*
    04413D22M31V40+
    05514E23N32W41-
    06615F24O33X42.
    07716G25P34Y43/
    08817H26Q35Z44:

    Standards

    Structure of a QR code (version 7), highlighting functional elements

    Several standards cover the encoding of data as QR codes:

    • October 1997 –ISO/IEC 18004:2000 Information technology –QR code (now withdrawn)
      Defines QR code models 1 and 2 symbols.
    • 1 September 2006 –QR Code 2005 bar code symbology specification (now withdrawn)
      Defines QR code 2005 symbols, an extension of QR code model 2. Does not specify how to read QR code model 1 symbols, or require this for compliance.
    • 1 February 2015 –QR Code barcode symbology specification (now withdrawn)
      Renames the QR Code 2005 symbol to QR Code and adds clarification to some procedures and minor corrections. It was withdrawn and updated to 18004:2024 in August 2024, which optimizes encoding efficiency, improves error correction, and refines structured append functionality.
    • May 2022 –Rectangular Micro QR Code (rMQR) bar code symbology specification
      Defines the requirements for Micro QR Code.
    • August 2024 – ISO/IEC 18004:2024 Information technology — Automatic identification and data capture techniques — QR code bar code symbology specification

    At the application layer, there is some variation between most of the implementations. Japan's NTT DoCoMo has established de facto standards for the encoding of URLs, contact information, and several other data types. The open-source "ZXing" project maintains a list of QR code data types.

    Variants

    Model 1

    Model 1 QR code is an older version of the specification. It is visually similar to the widely seen model 2 codes, but lacks alignment patterns. Differences are in the bottom right corner, and in the midsections of the bottom and right edges are additional functional regions.

    • iQR code example
      iQR code example

    Frame QR

    Frame QR is a variant of the QR code standard which arranges the code in a frame around a central empty area. It is intended to be used in applications where an image, artwork, or branding is desired to be part of the code. It is a distinct code variant and is unrelated to the use of the standard QR code's error correction to insert artwork.

      tQR (also known as tQR code) is a QR code specially designed for rail transport to distinguish between the different opening and closing positions of platform screen doors, which vary depending on rolling stock. The initial "t" stands for "toughness" and "train". It has an outer frame, and its main feature is that it can be restored even if up to 50% of data bytes is missing. It was jointly developed by Denso Wave and the Tokyo Metropolitan Bureau of Transportation.


      View original on Wikipedia | Back | FazBrowse Home