Skip to Main Content

Sales:

texto

​​5 Key Differences in Barcode Grading Standards: ISO 15415 vs. ISO/IEC TR 29158​

​​​​There are two verification standards from the International Organization for Standardization (ISO) that govern two-dimensional (2D) and direct part mark (DPM) codes: 2D codes printed on a label use ISO/IEC 15415, while 2D DPM codes use ISO/IEC TR 29158. The modifications that make 29158 different from 15415 are often oversimplified, so let’s examine what makes these two grading standards different.
Label-based barcode next to DPM barcode

​​Key Takeaways​ 

​​ISO 15415 and ISO 29158 barcode grading standards differ in several key areas:

  • ​Aperture selection
  • ​Thresholding algorithms
  • ​Lighting options
  • ​Image sensor exposure
  • ​Calibration procedures

​ISO 29158 introduces specialized algorithms and flexible lighting for DPM codes, improving grading accuracy on challenging surfaces compared to ISO 15415.​

​​Accurate barcode reading is vital for manufacturers as it enables quick, reliable tracking of parts and products to ensure inventory accuracy and improves supply chain management. When it comes to verifying two-dimensional (2D) and direct part mark (DPM) codes, understanding the right standards is essential for maintaining accuracy and compliance with industry regulations. Unreadable codes can cause production delays, increased costs, and tracking or identification errors, which can disrupt distribution logistics and compromise product quality.

Industrial Regulations for Direct Part Marks | English

Industrial Regulations for Direct Part Marks Whitepaper

Download

1. Aperture size impacts code accuracy

Aperture refers to the circular sample captured at grid intersections which the software uses to determine if a cell is dark or light. The size of the aperture directly impacts the result. If the sample circle captures both dark and light cells, it will create a shade of gray. Ideally, the aperture should be centered within a cell that is the correct color. Cells without crisp edges, or with other cell colors bleeding into them, will likely result in gray. The decode process will convert the image to binary, so anything that was gray will have to be converted into either black or white – leaving room for inaccuracies. An improperly sized aperture, either too large or too small, will lower the accuracy of the grade.

ISO 15415:

  • The recommended aperture size for grading and decoding is typically 80% of the module size.
  • This standard ensures optimal scanning performance by balancing the resolution needed to accurately decode barcodes without introducing unnecessary noise or errors.

ISO/IEC TR 29158 (AIM DPM):

  • The reader software automatically adjusts the aperture size until the symbol is decoded.
  • Grading is repeated with two aperture sizes (50% and 80%), and the better grade is reported as the final result.
  • If the symbol cannot be decoded with either aperture, the DECODE grade will be "F," and a note will be added to the report, even if the symbol was recognized and decoded with a different aperture size in earlier grading phases.

    Barcode Verification Aperture

2. Global threshold: 15415’s fixed range vs. 29158’s adaptive range

​The global threshold is the point on a scale from dark to light that determines if a cell is closer to light or closer to dark. This comparison emphasizes the differences:

​ISO 15415:

  • ​The global threshold is the median between the highest brightness (Rmax or RL) and the lowest brightness (Rmin or RD).  
  • ​With paper labels, the Rmax value will normally come from a space within the code or the quiet zone and tend to be consistent and not vary significantly because paper label spaces don’t have specular reflection or spots of glare.

​ISO/IEC TR 29158

  • ​The global threshold is calculated using "Otsu’s Algorithm," which more optimally minimizes the variance between dark and light elements, leading to higher modulation values. This is a key reason why it delivers higher grades than ISO 15415, particularly for DPM codes
    • ​In DPM codes, glare spots can cause the Rmax to differ significantly from most other spaces in the code. This discrepancy raises the global threshold, causing other areas of the code to be closer to that threshold, thereby lowering their modulation value.
Machine Vision Product Guide​ | English

Machine Vision Product Guide

Learn how Cognex machine vision systems and AI easily automate complex vision tasks. 

Download Guide

3. Lighting: standard vs. flexible lighting approaches

​Lighting plays an important role in barcode detection by ensuring even and clear illumination, which enhances the contrast between bars and spaces. Proper lighting minimizes shadows and reflections that could obscure the barcode, resulting in more accurate and reliable readings. A key distinction between the two barcode quality standards is the broader range of lighting options permitted in ISO 29158.

ISO 15415:

  • ​The default is a four-sided 45˚ light.

​​ISO/IEC TR 29158:

  • ​Allows additional lighting angles to make illuminating challenging DPM codes possible
    • ​30˚ from four sides, which can be either north/south or east/west
    • ​90˚ diffuse on-axis lighting
  • ​Light sources used are reported with a notation including the angle and a letter (Q for 4 light sources, T for 2 light sources, and S for 1 light source).

Real-World Scenario: In a smartphone assembly line, a model predicts whether a screen has a scratch or a crack. If it predicts a scratch when it's actually a crack, cross-entropy loss penalizes this incorrect prediction due to the severity of the error. This encourages the model to refine its accuracy, enhancing defect detection precision and minimizing costly assembly errors.​

Barcode verifier Lighting options.png

4. Image sensor: adjusting for enhanced exposure

​The image sensor works similarly in both standards, but in ISO29158 the exposure is automatically adjusted to brighten darker codes, ensuring that the full grayscale range is used by the sensor. While both standards use high illumination intensity (so that ambient light has no practical contribution to the image), the exposure value is changed in 29158:

  • ​The best indication of light intensity is the duration of the exposure time, as a short exposure time is only possible because of bright light.
    • ​If the light increases, the exposure time decreases – which is better.
  • ​Since the changed exposure time is known, the true brightness can be computed.
  • ​The "Minimum Reflectance" (MR) parameter, found near the bottom of the 29158 parameter grades, checks to make sure the reflectance of the pre-adjusted image has at least a 5% contrast.

5. Calibration: ensuring optimal exposure for accurate brightness and reflectance

Calibration ensures that darker codes appear darker when captured, creating a baseline for reflectance values in the verification software. This process involves mapping a camera’s measurements to actual reflectance levels to guarantee accurate barcode readings.

​It starts with determining the correct exposure time to achieve a fully bright image on a calibration card. The card’s barcode symbols are then measured against a National Institute of Standards and Technology (NIST) traceable judge card to establish the exact Symbol Contrast (Rmin/Rmax) values. These values are input into the verification software, which adjusts the camera settings accordingly.

​Currently, no DPM-specific calibration cards exist for challenging ISO 29158. While a Data Matrix conformance test card can be used, the contrast values won’t perfectly match those on the card. It’s recommended to also test the verifier using ISO 15415.

Barcode Verifier Calibration card.jpg
Understanding Barcode Verification Results White Paper | English

Understanding Barcode Verification Results

Discover how to resolve issues and drive smarter process improvements.

Download
Last Modified on10/20/2025

Related Resources