ISO/IEC 15416 for 1D Bar Codes
ISO 15416 is a standard that establishes the guidelines on how to assess the print quality of linear (1D) bar code symbols.
It provides a set of quality indicators that give insight on specific areas of the bar code quality. You can use these indicators to compute an overall grade for the inspected bar code.
In Open eVision 23.12, ISO 15416 grading is only available for the Ean13, Code128 and Gs1-128 symbologies.
You can find more information on these symbologies on the ISO website (must be purchased) and on the GS1 website (for free).
The scan lines
Each of the 9 grades are computed on 10 horizontal scan lines:
1. | A margin of 10% is removed at the top and at the bottom of the bar code. |
2. | The 10 scan lines are distributed evenly on the remaining bar code. |
3. | 9 grades between 4.0 and 0.0 are computed for each line. |
4. | Each type of grade is averaged over the lines to compute 9 overall symbol grades. |
The decoding
For each scan line, a global threshold is computed:
1. | All pixels above the threshold belong to a space and all pixels below to a bar. |
2. | Open eVision computes the exact bar / space widths with sub-pixel interpolation. |
3. | Open eVision decodes the scan line with the reference decoding algorithm of the symbology. |
This decoding process is imposed by ISO 15416.
Open eVision uses a different and more robust algorithm (based on gradients instead of thresholds) to locate the bars and the spaces of a bar code. Thus, Open eVision can recognize and read bar codes that are otherwise not decoded by this simpler ISO 15416 process (for example when the illumination is not uniform along the bar code).
The grade values
Each grade is represented by a number from 4.0 to 0.0 with 0.1 steps or by letters from A to F.
□ | In this document, we use the numbers notation. |
□ | Open eVision returns integers from 40 to 0 instead of float values from 4.0 to 0.0 to avoid any rounding issue. |
Numeric grade |
Alphabetic grade |
---|---|
4.0 to 3.5 |
A |
3.4 to 2.5 |
B |
2.4 to 1.5 |
C |
1.4 to 0.5 |
D |
0.4 to 0.0 |
F |
The ISO 15416 quality indicators
The decode grade
● | For each scan line, the decode grade is set to 4.0 if the decoding succeeds and 0.0 otherwise. |
Symbol Contrast grade
● | The symbol contrast grade indicates the fraction of the total image contrast used by the bar code for each scan line. |
► | If the printing contrast is too weak, if the lighting is not bright enough or if the camera exposure time or gain is too small, the grade is low. |
The bars and the spaces are too close on the gray scale
The minimum reflectance grade
● | For each scan line, the minimum reflectance grade is set to 4.0 if the lowest gray value is less than half of the highest gray value and 0.0 otherwise. |
► | If the printed barcode or lighting is too bright or if the camera exposure or gain is too high, the grade is low. |
The minimum edge contrast grade
● | The minimum edge contrast grade indicates the smallest contrast between two adjacent bar and space (including the quiet zones). For each scan line, this grade is 4.0 if the minimum edge contrast is at least 15% (38 gray values) and 0.0 otherwise. |
► | A dirty background can result in a low grade. |
One space is too dark
The modulation grade
● | The modulation grade indicates the importance of the minimum edge contrast relative to the symbol contrast. |
► | A dirty background can result in a low grade. |
There is a light defect in the bar
The defects grade
● | The defects grade indicates the importance of the irregularities found within the elements and the quiet zones. |
□ | Damaged or dirty bars or spaces can result in a low grade. |
The decodability grade
● | The decodability grade indicates the importance of the differences between the distances measured and expected. |
► | If the distances measured are far from those expected, the grade is low. |
● | Bad measured distances can have several causes: |
□ | The code is badly printed. |
□ | The image acquired by the camera is blurry / noisy. |
□ | The image acquired by the camera has a resolution that is too small. |
The bar is 1 px too large and the space is 1 px too thin
The additional requirements grade
● | The additional requirements grade indicates a requirement that is specific to a symbology. |
► | Code128, Gs1_128 and Ean13 grade the size of the quiet zone of the bar code. If the quiet zone is too small for a line, the associated grade is 0.0. |
The global grade
● | For each line, the global grade is the smallest of all the other grades. |
► | If two scan lines yield different decoded strings, the global grade is set to 0.0, irrespective of the other scan lines. |