Micro QR Code gradesπ
Overall symbol gradeπ
The overall symbol grade is calculated for all symbol types that are supported by HALCON, except for DotCode symbols,
and is always the first element in the tuple of quality grades returned by get_data_code_2d_results. The
overall symbol grade is the lowest quality grade obtained for the complete set of features that are evaluated for the
selected type of 2D data code. If, e.g., for one of the features the value '0.0' is returned, the overall symbol grade is graded
with the value '0.0' even if all other features have the value '4.0'.
Symbol contrastπ
The quality grade for the contrast of a symbol of type Data Matrix ECC 200, QR Code, Micro QR Code, or Aztec Code tests whether the two reflectance states in the symbol, namely dark and light, are sufficiently distinct. The quality grade is obtained by calculating the range between the average of the darkest 1% of the pixels and the average of the brightest 1% of the pixels in the 2D data code domain. A strong contrast leads to a good quality grade.
The figure below shows two symbols with different quality grades for their symbol contrast. The symbol with black and white modules has a high value, whereas the symbol with black and gray modules has a lower contrast and therefore also a lower quality grade.

Modulationπ
The modulation is evaluated for symbols of type Data Matrix ECC 200, QR Code, Micro QR Code, or Aztec Code as well as for symbols of type PDF417. It measures the uniformity of reflectance of the dark and light modules inside the symbol and therefore how good the modules can be distinguished into dark and light. Further, the correct classification states of the modules as well as the error correction capacity of the symbol are taken into account. If the modulation is low, the probability that modules are not correctly classified as dark or light modules increases.
The figure above shows three symbols with different modulations. The first one consists only of black and white modules.
It is clear which modules belong to the dark modules and which belong to the light modules, so the modulation
is graded with the value 4.0. For the other symbols, the contrast for a local part of the symbol changes so that one
part of the symbol consists of black and white modules and another part consists of gray and white modules. In
the second symbol the gray values of the black and gray modules differ only slightly and thus, the gray modules
still have a good chance to be identified correctly and the quality is graded with value 2.2. For the third symbol, the
gray modules have a gray value that is somewhere in between black and white, i.e., their amplitude is rather low
(see below).
A reliable identification of the modules is difficult and the quality of the modulation is graded with the value 0.1.
Fixed pattern damageπ
The fixed pattern damage describes how reliable a symbol can be located and identified in the image. To locate and identify a symbol in an image, the finder pattern as well as the quiet zone of the symbol are needed. If one of these elements is damaged, the quality grade decreases dependent on the amount of the damage.
As an example, the figure below shows three symbols of type Data Matrix ECC 200. The first symbol has a damaged quiet zone, the
second one is damaged at the L-shaped part of the finder pattern, and the third one is damaged at the alternating
part of the finder pattern. For all three kinds of damage, the amount of the damage is big enough to lead to a quality
grade of value 0.0.
Decodeπ
The quality grade for the decode feature describes whether a symbol can be successfully read with HALCON or
not. As only two possibilities exist (either the 2D data code can be read or not), opposite to the other features that
are evaluated, no four grades are available. If the data code reading was successful, the value is 4. If not, the value
theoretically would be 0, but in that case no quality grades can be obtained at all, because the quality grades can
only be queried for successfully read symbols.
Axial non-uniformityπ
The axial nonuniformity describes the aspect ratio of the symbol, i.e., the squareness of the modules or, respectively, of the grid that is built by the centers of the modules. Normally, the distance between the moduleβs center positions is the same in horizontal and vertical direction. If a symbol is scaled only in one direction, i.e., only in its width or height, the quality grade decreases.
As an example, the figure below shows a symbol of type Data Matrix ECC 200 that is scaled only in vertical direction.
The first symbol is not scaled, so that the value for the quality grade is 4.0. The other two symbols are scaled for different amounts,
so that dependent on the scale, the value is 2.2 and 0.0.
Grid non-uniformityπ
The quality grade for the grid nonuniformity quantifies the deviation of the modules from their ideal grid.
As an example, the figure below shows three
symbols of type Data Matrix ECC 200. For the first one, the modules are arranged in a regular,
rectangular grid and the value for the quality grade is 4.0. For the other two symbols, the grid structure is not
rectangular anymore, i.e., the individual modules deviate from the ideal grid that is assumed for a 2D data code symbol.
Dependent on the amount of the deviation, the values for the quality grade decrease to 2.3 and 0.0.
Note that a bad value might also be caused by problems with the finder pattern, in which case the ideal grid may not be positioned correctly.
Print growth x and print growth yπ
The print growth indicates to which extent the dark and light modules fill out their module boundaries. For example, if too much toner was used when printing the data code symbol, the dark modules may be very large compared to the light modules. The print growth is measured in horizontal (x) and vertical (y) direction separately, which results in two distinct grades both contributing equally to the overall symbol grade.
Contrast uniformityπ
In contrast to modulation, which is a quality grade that concerns the complete symbol, contrast uniformity describes the minimum value of the modulations that were calculated for the individual modules in the data region of the symbol. The contrast uniformity is no quality grade and thus does not influence the overall symbol grade.
Unused error correctionπ
The quality grade for unused error correction quantifies the reserve in error correction that is still available after
reading the data code. A perfect data code requires no error correction at all, resulting in a quality grade of value
4.0 (
).
The more defective a data code becomes, the more the inherent error correction needs to be
applied to still be able to read the data code.
shows two symbols (
and
) for which degradations occur
inside the data patterns. Dependent on the amount of the degradations, the values for the quality grade decrease to
2.4 and 0.2.