Cell Contrast
- Updated2025-12-21
- 1 minute(s) read
Cell contrast tests whether the light and dark pixels in the image are sufficiently and consistently distinct throughout the code. The angle of illumination, reflectance, and variation of ink coverage can all affect cell contrast. The cell contrast parameter is similar to the symbol contrast parameter used in the ISO 15415 grading scheme; however, the process for computing cell contrast is different from the process used to compute symbol contrast.
To compute cell contrast, a histogram is constructed using the grid centers of the data matrix code. Mean light and mean dark values are computed for the light and dark elements of the grid center, and are used to calculate the cell contrast as shown in the following equation:
Cell Contrast = (Mean Light - Mean Dark) / Mean Light
The following list shows how cell contrast is graded.
- A (4.0) if cell contrast ≥ 0.3
- B (3.0) if cell contrast ≥ 0.25
- C (2.0) if cell contrast ≥ 0.20
- D (1.0) if cell contrast ≥ 0.15
- F (0.0) if cell contrast < 0.15
The following figure shows a Data Matrix code with a cell contrast of 0.7045, which produces a grade of A.
