Reader

Data Matrix Reader

class gs1grader.reader.data_matrix_reader.DataMatrixQAReader[source]

Bases: object

Datamatrix image reader using opencv library

read(filename: str) Mat | ndarray[source]

Read a DataMatrix image from a file.

This method uses OpenCV’s imread function to load an image from the specified file path. The image is returned as a MatLike object which contains the image data in a format compatible with OpenCV operations.

Parameters:

filename (str) – The path to the image file to be read.

Returns:

An OpenCV MatLike object containing the image data.

Return type:

MatLike

Example:
>>> reader = DataMatrixQAReader()
>>> image = reader.read("datamatrix.png")

Data Matrix Decoder