A Closer Look at the ISO 15415 2D Code Grading Process

ISO 15415 2D Code

The diagnostic information provided by verification software requires interpretation. A basic understanding of the decode and grading process can help users know what types of adjustments they may need to make like verifying the aperture size or changing the lighting angle. Previously we explained the International Organization for Standardization (ISO) 15416 1D barcode grading process. Now let’s take a closer look at the steps involved in two-dimensional (2D) code grading for the ISO 15415 standard.

Decode process for 2D codes

The best barcodes have a high contrast between the black and white modules with crisp edges and ideal proportions. Even the slightest imperfection can cause problems with the code. A barcode verifier will compare barcodes to a perfect version of the code and identify areas with issues. To fully understand why even the slightest variance matters, it is necessary to first understand how verification software decodes barcodes. Let’s use a Data Matrix code as an example.

The Data Matrix symbology is probably the most common 2D code. It allows for the highest density of data per module, especially for small symbols, so grading quality is essential. The finder pattern consists of solid left and bottom sides, which form an “L” pattern and a horizontal and vertical clocking pattern (or track) on opposite sides of the “L”. The clocking pattern specifies the number of modules in the matrix and is used to decode the grid on which the modules are placed. All of the information about the symbol size, encoding, and error correction is determined from the size of the matrix.

Data Matrix code elements

The decode process involves multiple steps in order to read and grade a code. Keep this process in mind when verifying, as the quality parameters are all calculations of how likely each of the decode steps is to fail. The steps proceed in the following order:

  1. The verifier captures the image.
  2. Software adds a blur to the image to remove noise or texture in the background.
  3. Global threshold is calculated on the blurred image. The global threshold is the set value to determine if a cell is closer to white or black.
  4. The software converts it to a black and white, or "binary" image. To binarize the image, software takes the blurred image that has gray values and then converts every pixel to either black or white.
  5. Software traces lines to find the "L" pattern and looks for a clocking pattern. Essentially it is locating the finder pattern.
  6. Based on the spacing of the clock teeth, the reference decode grid is generated.
  7. At the grid intersection, a circle is drawn (the aperture), and the light value contained is compared to the threshold, creating a sequence of binary data based on the color of the cell called a bit stream.
  8. The bit stream (data sequence) is corrected using Reed-Solomon error correction.
  9. The corrected bit stream is converted to ASCII values revealing the data within the code.

ISO 15415 Codes

Importance of aperture size for 2D codes

For 2D codes, aperture refers to the circular sample that is captured at the grid intersection. Each of those sample circles are what the software will use to determine whether a cell is dark or light. Any time the sample circle captures both dark and light cells within it, it will result in a shade of gray. Ideally, you want your aperture to be perfectly centered in the middle of a cell that is the correct color. Cells that start off without a crisp edge or have other cell colors bleeding into them will most certainly result in a gray color. The decode process will convert the image to binary, so anything that was gray will have to be converted into either black or white. Any cell that is gray leaves room for error. Too big or too little
aperture will cause your grade to be less accurate. 

In the ISO 15415 standard for 2D codes printed on a label, you must set the aperture size in accordance with your application standard. It is typical that an application standard will set the aperture size to be 80% of the smallest module size allowed within the application. For instance, a typical GS1 application allows a range of X-dimensions from 10 MIL to 20 MIL and specifies an aperture size of 8 MIL.

ISO 15415 grading process

During the decode process, several additional steps must occur to complete the grading process. The first step is to determine whether the code can be decoded by the standard reference decode algorithm. This is essentially a very basic algorithm that runs through the decode process discussed above. All verifiers use the standard reference decode algorithm for their first step in the verification process. This is a way to essentially guarantee that even the most rudimentary barcode readers are able to decode the symbol.

If a code cannot be decoded, the verifier will show an “F” grade and state “NO DECODE.” This is different from how a failing code that has been decoded would be displayed. A code that receives an “F” grade but passed the decode process would show a grade for each of the quality parameters. The lowest grade received will then become the overall grade for the code. For example, if the results show an “A” for every parameter but a “B” is given for axial non-uniformity, the grade for that barcode will be a “B”.

ISO 15415 Grading Process


Once the verification process is complete and a formal grade has been generated, the next step is to see what parameter(s) are causing the grade to be lowered. Once the lowest scoring parameters have been identified, a closer look at the code itself will illuminate exactly what modules are causing the issue. To view common solutions to undesirable results, download the Understanding Verification Results Whitepaper.

More Posts on


Join MyCognex