Article 2 -
“Symbolic Structure”In the last article
, Basic QR Characteristics, I talked about the basic parameters and capabilities of the QR code. This article will explain in more detail which areas are responsible for what, and what squares in the corners, and why the picture is generally like that. This article will be the basis for the 3rd dedicated to the principles of coding information using a QR code, in which I will give a small example in C #.
So, let's get started. QR code consists of square modules, which are logically combined into an array, the code must contain the coding region (that part in which information is written), functional templates, a named pointer, a separator, temporary templates, alignment templates. Functional templates do not participate in encoding information. The symbol should be surrounded on all sides by an indent, which is called the "quiet zone".
(
Note: I use the word “pattern” in the meaning of the pattern, because there is no Russian-language information, it is not always easy to choose a term that contains the essence. In programming, there is a tendency to use the word pattern, which is anglicism and not good for “great and mighty ").
A template is a part of code that is always present in it in the same form. Depending on the version used and the type of code, the number of templates may vary.
')
Here are the illustrations:

The key areas are the locations of the search pattern, they look like concentric, alternating in color, squares. 7x7 modules, 5x5 modules, 3x3 modules. The ratio between them is 1: 1: 3: 1: 1

- Search patterns are specially separated by a separator so that no other information overlaps and the pattern is clearly identified.
- Temporary templates , horizontal and vertical, respectively, consist of one module width per row or column as a train of black and white modules, and the template begins and ends with a black module. The time template allows you to determine the density of characters in a particular code and the version used. Horizontal passes between the separators of the upper search patterns by line 6, and the vertical one between the separators on the left side of the 6th column.
In the MicroQR code, the horizontal temporal pattern runs along the 0th column and the 0th row, respectively, as shown in the figure:

- Alignment patterns are presented in the version of QR code 2 and higher. They are presented in the form of concentric, alternating in color, squares. The size of 5x5 modules, 3x3 modules. Must be arranged symmetrically on both sides of the diagonal passing through the upper left corner to the lower right, evenly between the vertical temporary template and the opposite side. In addition to the documentation, the recommended location of these parts and the number depending on the version.
- Encoding region , contains encrypted information and code words for its recovery
- "Quiet zone" separates the code from any symbols from 4 sides, it is a white continuous band.


Here is the matrix method of dividing a bar code picture visually, the blocks do not have to be square, in higher-level versions they have an even more bizarre shape and their density increases accordingly. I recall that the number of versions of the QR code is 40.
Sources:
Information technology - Bar code symbology - QR codeInformation technology - QR Code 2005 bar code symbology specificationInformation technology - Bar code print quality test specification - Two-dimensional symbols