Reading/Decoding

Valid data matrices:

The universal reading/decoding function reads and decodes a data matrix with any orientation. This function first detects the skew angle, deskewes the image, and afterwards tries to decode the unskewed data matrix. Use this reading function only if you know the position of the barcode (the outlining rectangle), or when only the barcode is available on the image. In other cases, use ReadAllDataMatricesOnImage to detect the positons of the available data matrices on the image and decode them. This function assumes that there is nothing on the given part of the image but the data matrix, except for some additive noise. See the examples below.

The images “A” and “B” are readable, correct data matrices, but “C” is an incorrect, unreadable data matrix due to the large noise in the outlining rectangle of the data matrix.