* Corresponding author′s email: firstname.lastname@example.org
Data Matrix and QR codes are two of the most popular types of two-dimensional (2D) matrix bar codes, which are the descendants of well-known 1D bar codes. However, compared to 1D bar codes, they offer many benefits. They enable us to store much more information in the same area, omnidirectional readability, readability even with partial code corruption, error correction, etc.
2D codes began to be used in the automotive industry but quickly spread to other areas. They are used by many industry organizations as an appropriate industry standard, are often used in production, distribution, storage, and sales processes in product labeling, and are also used in monitoring and analysis of production processes in car production.
The monograph deals with the recognition of Data Matrix and QR codes in images. It presents the current state of knowledge in the field and presents the principles of image processing that can be used to address the topic. The work summarizes the results of the scientific and research work of the authors and proposes their own original algorithms for the recognition of 2D codes in real-scene images. Our goal was to design an affordable solution that enables the processing of scanned 2D codes in real-time. Emphasis is placed on the possibilities of use in industrial practice.
We have proposed algorithms which localize single or multiple Data Matrix and QR Codes in an image and decode information, which is stored in them. Image processing techniques like edge detection, adaptive thresholding, connected component labeling, image moments, and local features under sliding window are utilized to identify objects of interest or areas in an image, which can be 2D codes or their parts. We also deal with partially damaged and perspective distorted 2D codes. The recognition rate of the presented algorithms was tested on publicly available test data sets of images with Data Matrix and QR codes. Test data sets are freely available online, so other authors can compare their results with ours. Algorithms are computationally efficient, work well for low-resolution images, and are also suited to real-time processing.
The monograph is intended mainly for programmers and developers of business applications, researchers, teachers, doctoral students and students at technical universities, as well as for the scientific community and professionals with an interest in the topic.
This monograph was developed within the project KEGA 006STU-4/2021: „Progressive form of interdisciplinary education and support for the development of vocational subjects in the university environment“.
Keywords: 2D matrix code, Data Matrix Code, QR Code, Finder Pattern, Timing Pattern.
Appendix B.1: Data Matrix test data set
Samples from the Data Matrix code test data set (the data set contained 111 samples).The complete Data Matrix code test data set is available on
Other data Matrix codes from specific manufacturing process – laser marked on metal tools are available on
Appendix B.2: QR code test data set
Samples from the QR code test data set (the data set contained 595 samples).The complete QR code test data set is available on
Other QR codes from specific manufacturing process are available on