Reading a Matrix Code
Reading a matrix code
You can read matrix codes in an image automatically, using the EMatrixCodeReader::Read()
method. This method returns EMatrixCode instances, one per read data matrix code.
These instances include, among other things, for the found data matrix code:
□ | Its content (decoded string) , |
□ | Its position, |
□ | Its logical size, |
□ | Its encoding type, |
□ | Methods to draw the data matrix code on the source image. |
Note:
- EasyMatrixCode1 reads a single data matrix code in the image.
- EasyMatrixCode2 reads all the data matrix codes in the image at once.
Computing the print quality
To compute print quality indicators as defined by BC11, ISO 15415, ISO/IEC TR 29158 (formerly known as AIM DPM-1-2006) and SEMI T10-0701 standards, retrieve the grades with the GetIso15415GradingParameters, GetIso29158GradingParameters and GetSemiT10GradingParameters accessors of the EMatrixCode class.
Note:
- With EasyMatrixCode1, enable the grading before using the Read method.
- With EasyMatrixCode2, the grading is always enabled.
Reading GS1 data matrix codes
EasyMatrixCode is able to find and decode GS1-compliant data matrix codes.
The GS1 standard adds semantic identifiers to the contents of a data matrix code, so that they are interpreted in an easy and consistent way.
GS1-compliant content is structured as follows:
]d2[GS1]{Id1}{Value1}[GS1]{Id2}{Value2}…
where:
□ | “]d2” is the string identifying a GS1-compliant stream, |
□ | [GS1] is the GS1 escape character (0x1d), |
□ | {Id} is an application identifier, |
□ | {Value} is the value associated to that identifier. |
Example
The string:
]d2[GS1]11180112[GS1]15190101
can be interpreted as follows:
□ | It contains two GS1 parts, 11180112 and 15190101. |
□ | The first (11180112) is composed of the identifier 11 and the value 180112, meaning that the product has a production date (the meaning of identifier 11) of January 12th, 2018. |
□ | The second (15190101) is composed of the identifier 15 and the value 190101, meaning that the product has a best before date (the meaning of identifier 15) of January 1st, 2019. |
For more information, see https://www.gs1.org/