Published on: 8/24/2026 by Alex Suzuki

Data Matrix on Curved Surfaces

Data Matrix is a popular 2D matrix symbology that is visually characterized by a solid ‘L’ shape and a chessboard-like pattern at the edges.

Unlike other symbologies such as QR Code or Aztec, it does not have fixed anchor points in the interior data region, making it harder to map deformations that are non-projective, e.g. when a code is located on a curved surface. An example is shown below; here a Data Matrix code is used on a label attached to fresh produce in a supermarket.

Data Matrix codes printed on labels, located on fresh produce with curved surfaces
Data Matrix codes printed on labels, located on fresh produce with curved surfaces

Previously our Data Matrix decoder could only handle perspective warping (when the code is viewed at an angle), and it often failed to decode codes that were printed on curved surfaces. Starting with SDK version 1.17.0, we’ve added a grid-mapping technique that should better handle this kind of deformation.

Generally, we recommend the following for 2D barcodes printed on curved surfaces:

  • Favor small codes, avoid encoding unnecessary or redundant data
  • Code size should not exceed 25% of the curve diameter
  • Prefer QR Code or Aztec Code symbologies which include features that make them more robust to curvature

The improved detection algorithm is automatically enabled when the datamatrix symbology is configured and does not require an opt-in via configuration.

Under-the-Hood Improvements

In this release we applied the usual spit and polish: updating our dependencies and under-the-hood improvements to the code structure. Most significantly, we updated to the latest major version of the Emscripten WebAssembly compiler (6.0.7).