QRCode
QRCode
QRCode
Sumit Tiwari
Dept. of Technical Education
SITS Educators Society
Jabalpur, Madhya Pradesh, India
[email protected]
Abstract— QR i.e. “Quick Response” code is a 2D matrix code codes. By using QR code generating sites or apps, users can
that is designed by keeping two points under consideration, i.e. it generate and print their own QR codes for others to scan and
must store large amount of data as compared to 1D barcodes and use.
it must be decoded at high speed using any handheld device like
phones. QR code provides high data storage capacity, fast The QR code system consists of a QR code encoder and
scanning, omnidirectional readability, and many other decoder. The encoder is responsible for encoding data and
advantages including, error-correction (so that damaged code generation of the QR Code, while the decoder decodes the data
can also be read successfully) and different type of versions. from the QR code.
Different varieties of QR code symbols like logo QR code,
encrypted QR code, iQR Code are also available so that user can
choose among them according to their need.
Each QR Code symbol version has the maximum data decoding. There are 4 types of function patterns; they are
capacity, according to the amount of data, character type and finder pattern, separator, timing patterns, and alignment
error correction level. In other words, as the amount of data patterns.
increases, more modules are required to comprise QR Code,
resulting in larger QR Code symbols. Table 1 show the data Encoding region contains data, which represents version
capacity of version 40 for different type of data. information, format information, data and error correction
codewords. Fig 3 illustrates the structure of a QR Code
symbol.
III. QR CODE ERROR CORRECTION
QR Code employs error correction to generate a series of error
correction codewords which are added to the data codeword
sequence which enable symbol to be read even if it is dirty or
damaged. The QR code achieves powerful error-correction
capability by using Reed-Solomon codes, a widely used
mathematical error-correction method. Four levels of error
correction are available, higher level has high capability of
recovery. Table 2 shows error-correction levels and their
approximate ability of error correction.
When selecting the level of error correction, environmental
conditions as well as the desired size of the QR Code symbol
need to be taken under consideration.
40
the QR code so that QR code scanners can search for
this ratio of light to dark modules to detect the finder
patterns and correctly orient the QR code for decoding.
• Separators: Separators are the one-module wide areas
of whitespace between each finder pattern and encoding
region.
• Timing Patterns: There are 2 timing patterns, i.e.
horizontal timing pattern and vertical timing pattern.
They are consisting of alternating dark and light
modules. The horizontal timing pattern is placed in the
6th row of the QR code between the separators. The
vertical timing pattern is located in the 6th column of
the QR code between the separators. These patterns are
helpful in determining the symbol density, module
coordinates and version information area.
• Alignment Patterns: An alignment pattern is constructed
of 5 × 5 dark modules, 3 × 3 light modules and a single
dark module in the center. QR codes that are version 2
and larger must have alignment patterns and the number
of alignment patterns depends on the symbol version.
• Encoding Region: Encoding region contains format
information, version information, data and error
correction codes. For format information, one-module
array must be reserved near the top-left, top-right,
bottom-left finder pattern and version information, an Fig.5 QR code encoding
area of a 6 × 3 block above the bottom-left finder
pattern and a 3 × 6 block to the left of the top-right
finder pattern is reserved. start with the appropriate mode indicator which is used
for encoding.
• Quiet Zone: It is a 4-module wide area containing no
data, and it used to ensure that the surrounding text or The number of characters that are being encoded is
markings should not misguide the QR code data. represented by the string of bits known as Character
Count Indicator. Character Count Indicator is placed
after the mode indicator and its length is version
V. ENCODING AND DECODING OF A QR CODE dependent.
A. Procedure for the generation/encoding of a QR Code • Error Correction Coding: QR codes use error
In order to convert input data into a QR code symbol, we’ll correction. This means that the string of data bits that
go through some step [4] [5] [6]; figure 5 shows an overview represent our text, we must then use those bits to
of the encoding process. generate error correction codewords using a process
called Reed-Solomon error correction.
• Data Analysis: A QR code encodes a string of text. The
QR standard has four modes for encoding text: numeric, QR scanners read both the data codewords and the error
alphanumeric, byte, and Kanji. Each mode encodes the correction codewords. By comparing the two, the
text as a string of bits (1s and 0s), but each mode uses scanner can determine that it reads the data correctly or
a different method for converting the text into bits, and not, and if it did not read the data correctly it can correct
each encoding method is optimized to encode the data errors.
with the shortest possible string of bits. • Structure Final Message: The data and error correction
Therefore, first step should be to perform data analysis codewords generated in the previous steps must now be
to determine whether text can be encoded in numeric, arranged in the proper order. For large QR codes, the
alphanumeric, byte, or Kanji mode, and then select the data and error correction codewords are generated in
most optimal mode for your text. blocks, and these blocks must be interleaved according
to the QR code specification.
• Data Encoding: Next step is to encode text. The result
of this step is a string of bits that is split up into data • Module Placement in Matrix: After generating the data
codewords that are each 8 bits long. codewords and error correction codewords and
arranging them in the correct order, you must place
The mode used for encoding is identified by the Mode the bits in the QR code matrix. The codewords are
Indicator, which is a string of 4 bits. Encoded data must arranged in the matrix in a specific way.
41
• Data Masking: Certain patterns in the QR code matrix modules as necessary. Also obtain a mask pattern
can make it difficult for QR code scanners to correctly reference.
read the code. To counteract this, the QR code • Determine Version Information: If version
specification defines eight mask patterns, each of which information is applicable then decode it from the
alters the QR code according to a particular pattern. version information area and then determine the
• Format and Version Information: The last step is to add version of the QR code symbol.
format and (if necessary) version information to the QR • Release Masking: In order to release the masking,
code by adding pixels in particular areas of the code XOR the encoding region bit pattern with the Mask
that were left blank in previous steps. The format pixels Pattern whose reference has been extracted from the
identify the error correction level and mask pattern format information.
being used in this QR code. The version pixels • Restore Data and Error Correction Codewords:
encode the size of the QR matrix and are only Restore the data and error correction codewords of
used in larger QR codes [4]. the message by reading the symbol characters
(according to the placement rules for the model).
B. Procedure for decoding a QR Code • Error Detection and Correction: By utilizing the
Decoding data from the QR code is the reverse of the error correction codewords, identify errors and if any
encoding procedure. Figure 6 shows an overview of the error is detected, correct it.
decoding process [5] [6]. • Decode Data Codewords: Divide the data codewords
into segments according to the Mode Indicators and
• Recognizing Modules: Recognize dark and light Character Count Indicators. And finally, decode the
modules as an array of “0” and “1” bits by locating data characters according to the mode(s) in use and
and getting an image of the symbol. output the decoded text as result.
• Extract Format Information: Decode the format
information and release the masking pattern and
apply error correction on the format information
VI. TYPE OF QR CODES
QR Codes are categorized into five broad categories [6].
42
B. Micro QR Code VII. MERITS AND DEMERITS OF QR CODE
This QR Code is only one orientation detecting pattern
code so that it can be printed in a smaller space. A major A. Merits of the QR Code
feature of Micro QR Code is it has only one position detection • Omnidirectional and Fast Scanning: QR code can be
pattern, compared with a regular QR Code that require a read much faster and scanned from any angle within
certain amount of area because position detection patterns are 360 degrees i.e. no need to align the scanner with the
located at the three corners of a symbol. code symbol.
• Small Size: QR code takes less space. A QR Code
Furthermore, QR Code requires at least a four-module can hold the same amount of data contained in a 1-D
wide margin around a symbol, whereas a two-module wide barcode in only one-tenth the space.
margin is enough for Micro QR Code. This configuration of • Huge Data Storage Capacity: QR code has high data
Micro QR Code allows printing in areas even smaller than QR storage capacity. A single QR Code symbol can
Code. contain up to 7,089 numerals (200 times the amount
of data storage capacity of the traditional 1-D
C. LogoQ (Logo QR Code)
barcode).
The Logo QR Code is a novel type of QR Code created to • Many Types of Data: The QR Code can handle
enhance visual recognizing-ability by blending it with letters numerals, alphanumeric characters, Japanese,
and pictures in full color.
Chinese or Korean characters and binary data.
Since LogoQ is a highly designable type of QR Code, it • Error correction: Error correction technique used in
becomes possible to differentiate LogoQ from the ordinary QR QR codes enables successful decoding of the code
Code. symbol even if up to 30% of the data is dirty or
Since a proprietary logic is used when generating LogoQ damaged.
codes, it is possible to combine design-ability and readability. • Direct Marking: The QR Code due to high degree of
readability under low-contrast conditions allows
D. iQR Code printing of a symbol directly onto a part or product.
iQR Code is a matrix-type 2D code, allowing easy reading • Available for Everyone: Anyone can make their own
of its position and size. This code allows a wide size range of QR code according to their need, for example, user
codes from ones smaller than the traditional QR Code and can create QR code of the URL of its own website
Micro QR Code to large ones that can store more data than for advertising purpose.
these. • Wide Range of Uses: There are lots of potential uses
of QR codes. They can be used to extend the user
This code can be printed as a rectangular code, turned-over experience in store, restaurants, websites and more.
code, black-and-white inversion code or dot pattern code
(direct part marking) as well, leaving a broad range of
applications in various areas. B. Demerits of the QR Code
Although QR code has many positive points on its side but,
E. Encrypted QR Code there are some demerits of the QR code too, such as, Need of
Encrypted QR Code is a type of QR Code equipped with QR code scanner; to decode the code users must have a QR
reading restricting function. This can be used to store private reader app, which limits the audience; Security issues, before
information and to manage a group which is capable of scanning a code, the scanner can never really know where the
accessing QR Code information. Basically, an encrypted QR code is going to lead them; Lack of public awareness, large
Code is a QR Code, which contains encrypted data. portion of population is still unaware of this technology.
In Encrypted QR Code system, data information is
encrypted by using encryption techniques and then the VIII. AREA OF APPLICATIONS
encrypted data is applied to the QR Code encoder (generator) Although the QR Code was originally designed to track
which generates the QR Code. Later this QR Code is first automotive components but, now these days it is rapidly used
scanned and decoded by the QR Code decoder then data in many other areas where traditional barcodes are used, such
information is retrieved using decryption techniques. Figure 8 as Manufacturing, Retailing, Healthcare, and Transportation
show an overview of encrypted QR code mechanism. [7]. Also, QR code found useful in some novel application
43
fields including mobile marketing, online advertising, TABLE III. STUDY REPORT BY SCANLIFE
electronic ticket/coupon, electronic payment, identification,
academics[8], information security, OMR sheet tampering
detection [9] etc.
Mobile marketing gains popularity and has recently
witnessed rapid growth, where the QR Code increasingly
appears in print and online advertising, as well as on signs,
hoardings, posters, and other particulars.
By scanning a QR Code with a smartphone, consumers can
be connected to a relevant Web page or receive targeted
marketing messages such as a special offer, discount coupon,
product or store information, etc.
44