DataMatrix Detector

Industrial-grade 2D barcode detection & decoding engine

Test Sample Image

Run the detector on the built-in sample image to instantly see results without uploading anything.

Upload Your Image

Upload any image (JPG, PNG, BMP, TIFF) containing a DataMatrix code. Colour or grayscale accepted.

Technical Reference

What is DataMatrix?

DataMatrix is a two-dimensional matrix barcode consisting of black and white modules arranged in a square or rectangular pattern. It is widely used in industrial manufacturing, electronics, pharmaceuticals, and logistics for marking small components because it can encode large amounts of data in a very small physical area.

Unlike linear (1D) barcodes, DataMatrix codes include Reed–Solomon error correction, which allows them to be read even when partially damaged or obscured — up to 30 % of a code can be lost while still allowing successful decoding.

About the Detector

This detector was developed by ZBS — Zentrum für Bild- und Signalverarbeitung e. V. (David Reese, 2023–2024) on behalf of TechnoTeam Bildverarbeitung GmbH.

The algorithm uses circular-feature detection to locate candidate codes, followed by homography-based rasterization and Reed–Solomon decoding. It supports square DataMatrix symbols as well as selected rectangular sizes (8×18 and 12×26) and can handle mirrored (flipped) codes.

Usage Tips

  • Images should have good contrast and even lighting across the code area.
  • The detector accepts colour images; conversion to grayscale is done automatically.
  • Increase radius_circular_feature_detection for large, low-resolution codes.
  • If detection is slow, reduce input_scale (e.g. 0.25) for large images.
  • Multiple codes in one image return multiple hypotheses sorted by confidence.