Reading a Matrix Code

Reference | Code Snippets | dedicated code snippet: Reading Data Matrix Codes

You can read the matrix code in an image automatically as follows:

a. Create an EMatrixCodeReader object In a general content, the term object should be understood with the meaning of a class instance. In EasyObject, an object is a maximally-sized area of adjacent connected pixels belonging to the layer foreground..
b. Call the Read method to return a vector containing the detected and decoded matrix codes in the image.

The Read method provides the following overloads:

One overload that takes an ERegion object as an additional parameter to specify more precisely the search area.
One overload to specify a search grid when your matrix codes are placed in a regular fashion.

The EMatrixCode2.EMatrixCode instances contain the following information for each found data matrix code:

Its decoded string
Its codewords (raw bytes)
Its position in the image
Its logical size
Its encoding type
Its printing polarity (black on white or white on black)
Its grading results (if EMatrixCodeReader.ComputeGrading is True)
Its reliability score
Methods to draw the data matrix code on the source image