Saturday, February 11, 2012

QR code

From Wikipedia, the free encyclopedia
QR code for the URL of the English Wikipedia Mobile main page, "http://en.m.wikipedia.org"

QR Code — abbreviated from Quick Response Code — is the trademark for a type of matrix barcode (or two-dimensional code) first designed for the automotive industry. More recently, the system has become popular outside of the industry due to its fast readability and large storage capacity compared to standard UPC barcodes. The code consists of black modules arranged in a square pattern on a white background. The information encoded can be made up of four standardized kinds ("modes") of data (numeric, alphanumeric, byte/binary, Kanji), or by supported extensions virtually any kind of data.[1]

Invented by the Toyota subsidiary Denso Wave in 1994 to track vehicles during the manufacturing process, the QR Code is one of the most popular types of two-dimensional barcodes.[2] It was designed to allow its contents to be decoded at high speed.[3]

The codes are used frequently in the United Kingdom[4] and the United States[citation needed]; QR usage is growing fastest inCanada and Hong Kong.[5]

Contents

Standards

Structure of a QR code, highlighting functional elements

There are several standards in documents covering the physical encoding of QR Codes:[6]

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

Uses

Although initially used to track parts in vehicle manufacturing, QR Codes are now (as of 2012) used over a much wider range of applications, including commercial tracking, entertainment and transport ticketing, product/loyalty marketing (examples: mobile couponing where a company's discounted and percent discount can be captured using a QR Code decoder which is a mobile app, or storing a company's information such as address and related information alongside its alpha-numeric text data as can be seen in Yellow Pages directory), band in-store product labelling. It can also be used in storing personal information for use by government. An example of this is Philippines National Bureau of Investigation (NBI) where NBI clearances now come with a QR Code. Many of these applications target mobile-phone users (via mobile tagging). Users may receive text, add a vCard contact to their device, open a Uniform Resource Identifier (URI), or compose an e-mail or text message after scanning QR Codes. They can generate and print their own QR Codes for others to scan and use by visiting one of several pay or free QR Code-generating sites or apps. Google has a popular API to generate QR Codes,[10] and apps for scanning QR Codes can be found on nearly all smartphone devices.[11]

QR Codes storing addresses and Uniform Resource Locators (URLs) may appear in magazines, on signs, on buses, on business cards, or on almost any object about which users might need information. Users with a camera phone equipped with the correct reader application can scan the image of the QR Code to display text, contact information, connect to a wireless network, or open a web page in the telephone's browser. This act of linking from physical world objects is termed hardlinkingor object hyperlinking. QR Codes may also be linked to a location to track where a code has been scanned. Either the application that scans the QR Code retrieves the geo information by using GPS and cell tower triangulation (aGPS) or the URL encoded in the QR Code itself is associated with a location.[12]

QR code has been used and printed on Chinese train tickets since late 2009.

QR Codes can be used in Google's mobile Android operating system via both their own Google Goggles application or 3rd party barcode scanners like ZXing. The browser supports URI redirection, which allows QR Codes to sendmetadata to existing applications on the device. Nokia's Symbian operating system features a barcode scanner which can read QR Codes,[13] while mbarcode[14] is a QR Code reader for the Maemo operating system. In the Apple iOS, a QR Code reader is not natively included, but more than fifty paid and free apps are available with both scanning capabilities and hard-linking to URI. With BlackBerry devices, the App World application can natively scan QR Codes and load any recognized Web URLs on the device's Web browser. Windows Phone 7.5 is able to scan QR Codes through the Bing search app.

In the USA, QR Code usage is expanding.[citation needed] During the month of June 2011, according to one study, 14 million mobile users scanned a QR Code or a barcode. Some 58% of those users scanned a QR or bar code from their home, while 39% scanned from retail stores; 53% of the 14 million users were men between the ages of 18 and 34.[15] QR Codes are also being tested for "virtual store" formats, particularly in South Korea[16]and Argentina.[17]

While the adoption of QR Codes in some markets has been slow to begin (particularly in markets such as the United States, where competing standards such as Data Matrix exist), the technology is gaining some traction in the smartphone market. Many Android, Nokia, Blackberry handsets, and the Nintendo 3DS, come with QR Code readers installed. QR reader software is available for most mobile platforms. Moreover, there are a number of online QR Code generators which enable users to create QR Codes for their own needs.

Design

Storage

The amount of data that can be stored in the QR Code symbol depends on the datatype (mode, or input character set), version (1,...,40, indicating the overall dimensions of the symbol), and error correction level (L[ow], M[edium], Q[uality], H[igh]). The maximum storage capacities occur for 40-L symbols (version 40, error correction level L), and are as follows (where character refers to individual values of the input mode/datatype, as indicated):[3][18]

Numeric onlyMax. 7,089 characters (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
AlphanumericMax. 4,296 characters (0–9, A–Z [upper-case only], space, $, %, *, +, -, ., /, :)
Binary/byteMax. 2,953 characters (8-bit bytes)
Kanji/KanaMax. 1,817 characters

Here are some sample QR Code symbols:

Encryption

Although encrypted QR Codes are not very common, there are a few implementations. An Android app,[19] for example, manages encryption and decryption of QR codes using DES algorithm (56 bits).[20] Japanese immigration use encrypted QR Codes when placing visas in passports.

Error correction

Example of a QR Code with artistic embellishment that will still scan correctly thanks to error correction. Content: "M.WIKIPEDIA.ORG"

Codewords are 8 bits long and use the Reed–Solomon error correction algorithm with four error correction levels. The higher the error correction level, the less storage capacity. The following table lists the approximate error correction capability at each of the four levels:

Level L7% of codewords can be restored.
Level M15% of codewords can be restored.
Level Q25% of codewords can be restored.
Level H30% of codewords can be restored.

Due to the design of Reed–Solomon codes and the use of 8-bit codewords, an individual code block cannot be more than 255 codewords in length. Since the larger QR symbols contain much more data than that, it is necessary to break the message up into multiple blocks. The QR specification does not use the largest possible block size, though; instead, it defines the block sizes so that no more than 30 error-correction symbols appear in each block. This means that at most 15 errors per block can be corrected, which limits the complexity of certain steps in 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.

Thanks to error correction, it is possible to create artistic QR Codes that still scan correctly, but contain intentional errors to make them more readable or attractive to the human eye, as well as to incorporate colors, logos and other features into the QR Code block.[21][22]

Encoding

The format information records two things: the error correction level and the mask pattern used for the symbol. Masking is used to break up patterns in the data area that might confuse a scanner, such as large blank areas or misleading features that look like the locator marks. The mask patterns are defined on a 6×6 grid that is repeated as necessary to cover the whole symbol. Modules corresponding to the dark areas of the mask are inverted. The format information is protected from errors with a BCH code, and two complete copies are included in each QR symbol.

The message data is placed from right to left in a zigzag pattern, as shown below. In larger symbols, this is complicated by the presence of the alignment patterns and the use of multiple interleaved error-correction blocks.

Four-bit indicators are used to select the encoding mode and convey other information. Encoding modes can be mixed as needed within a QR symbol.

IndicatorMeaning
0001Numeric encoding (10 bits per 3 digits)
0010Alphanumeric encoding (11 bits per 2 characters)
0100Byte encoding (8 bits per character)
1000Kanji encoding (13 bits per character)
0011Structured append (used to split a message across multiple QR symbols)
0111Extended Channel Interpretation (select alternate character set or encoding)
0101FNC1 in first position (see Code 128 for more information)
1001FNC1 in second position
0000End of message

After each 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, as shown below.

EncodingVer 1–910–2627–40
Numeric101214
Alphanumeric91113
Byte81616
Kanji81012

Alphanumeric encoding mode stores a message more compactly than the byte mode, but cannot store lower-case letters and has only a limited selection of punctuation marks. Two characters are coded in an 11-bit value by this formula:

V = 45 × C1 + C2

Alphanumeric character codes are as follows.

CodeCharacterCodeCharacterCodeCharacterCodeCharacterCodeCharacter
009918I27R36space
1110A19J28S37$
2211B20K29T38%
3312C21L30U39*
4413D22M31V40+
5514E23N32W41-
6615F24O33X42.
7716G25P34Y43/
8817H26Q35Z44:

Decoding example

The following images offer more information about the QR code.

License

The use of QR Codes is free of any license. The QR Code is clearly defined and published as an ISO standard.

Denso Wave owns the patent rights on QR Codes, but has chosen not to exercise them.[6] In the USA, the granted QR Code patent is US 5726435, and in Japan JP 2938338. The European Patent Office granted patent EP0672994B1 to Denso Wave, which was then validated into French, British and German patents, all of which are still in force as of November 2011.

The word QR Code itself is a registered trademark of Denso Wave Incorporated.[23]In UK, the trademark is registered as E921775, the word “QR Code”, with a filing date of 03/09/1998.[24] The UK version of the trademark is based on the Kabushiki Kaisha Denso (DENSO CORPORATION) trademark, filed as Trademark 000921775, the word “QR Code”, on 03/09/1998 and registered on 6/12/1999 with the European Union OHIM (Office for Harmonization in the Internal Market).[25]The US Trademark for the word “QR Code” is Trademark 2435991 and was filed on 29/09/1998 with an amended registration date of 13/03/2001, assigned to Denso Corporation.[26]

The word QR CODE is a separate trademark assigned to King Estate Winery Limited, US trademark 85293411.[27]

Variants

Example ofMicro QR

Micro QR Code is a smaller version of the QR Code standard for applications with less ability to handle large scans. There are different forms of Micro QR Codes as well. The highest of these can hold 35 numeric characters.

Standard QR Code is the QR code standard for applications that possess the ability to handle large scans. A standard QR Code can contain up to 7,089 characters, though not all QR readers can accept that much data.

Risks

Malicious QR codes combined with a permissive reader can put a computer's contents and user's privacy at risk. This practice is known as "attaging", a portmanteau of "attack tagging."[28] They are easily created and may be affixed over legitimate QR codes.[29] On a smartphone, the reader's many permissions may allow use of the camera, full internet access, read/write contact data, GPS, read browser history, read/write local storage, and global system changes.[30][31][32]

Risks include linking to dangerous websites with browser exploits, enabling the microphone/camera/GPS and then streaming those feeds to a remote server, analysis of sensitive data (passwords, files, contacts, transactions),[33] and sending email/SMS/IM messages or DDOS packets as part of a botnet, corrupting privacy settings, stealing identity,[34] and even containing malicious logic themselves such as JavaScript[35] or a virus.[36][37] These actions may occur in the background while the user only sees the reader opening a seemingly harmless webpage.[38] In Russia, a malicious QR Code caused phones that scanned it to send premium texts at a fee of USD$6 each.[28]

See also

No comments: