You are here: Start » Program Examples » Datamatrix

Datamatrix

Aim:

The task is to detect and recognize a single Data Matrix code.

Input:

An image containing a Data Matrix code. The position of the Data Matrix code is variable.

Output:

Detected a Data Matrix code and decoded it to text.

Hints:

Labeling connections is explained in this article.

Solution (AVS):

  1. In Workspace Explorer, open the workspace Examples, and in the Filmstrip window, select the Datamatrix dataset. Drag the Image channel to the ACQUIRE section.
  2. Add the ReadSingleDataCode filter to detect and recognize a Data Matrix code.
  3. Expand the inCodeParams in the Properties.
  4. Set the Polarity parameter to Dark.
  5. Set the MinRowCount parameter to 12.
  6. Set the MaxRowCount parameter to 12.
  7. Set the MinColumnCount parameter to 12.
  8. Set the MaxColumnCount parameter to 12.
  9. Set the MinModuleSize parameter to 3.
  10. Set the MaxModuleSize parameter to 8.
  11. Set the ExpectedDotSize parameter to Full.
  12. Set the MaxRectangleRatio parameter to 1.
  13. Set the AllowBrokenFinder parameter to False
  14. Show the decoded text on a new preview window.

Macrofilter Main

Used Filters

Icon Name Description
ReadSingleDataCode The main tool for reading both linear and matrix codes (Data Matrix, QR Code), including DPM.