# Data Extraction Method for Industrial Data Matrix Codes Based on Local Adjacent Modules Structure
## 1 Introduction  
Two-dimensional barcode symbols have been widely used in automated identification applications, such as industrial components retrospect [1], mobile robots [2], and Construction Safety Management [3]. Compared to the 1D barcode, 2D barcode symbols have more popular advantages, such as large data capacity, compact size, and strong fault tolerance [4]. With the rapid advancement of sensing capability and computational power in consumer electronic devices, the use of mobile cameras for barcode recognition has attracted significant attention from both academia and industry [5]. The mobile device can easily interact with the internet systems by identifying the physical code tag. Another important application is data transfer by applying barcodes captured by mobile phones [6]. At present, the most common printing 2D barcode symbols in daily life can be decoded rapidly and accurately by mobile phones.  
Many industrial Data Matrix barcodes are marked onto reflective, curved, or uneven surfaces, which can be challenging for barcode readers to identify reliably. Images captured by mobile cameras usually being of low quality with poor contrast, as well as low image contrast and complex code background, also make the problem of automatic information extraction extremely challenging. Decoding the industrial Data Matrix symbols quickly and reliably has become an important topic in the machine vision community. Most industrial Data Matrix symbols suffer from problematic artifacts, including exposure to aggressive environments, uneven lighting, curved surface, low contrast, rich texture, and blur, as shown in Figure 1.  
To address this issue, we introduce a data extraction method for processing low-quality DM images. Different convolutional neural network (CNN) models are used to recognize the black and white modules of a barcode. Unlike the traditional methods that predict the module color based on pixels of each module, we train convolutional neural networks to learn and verify the colors of two adjacent modules. The relations of modules are used to transform a square grid image into an edge image. After correcting the edge image, the barcode symbol is reconstructed, and the final result will be read by decoders. The advantages of the proposed method are selecting effective features without losing too much information when labeling modules.  
Our contributions include: (1) comparing different CNN models that help extract information from low-quality DM images; (2) unlike the traditional methods that predict the DM features based on pixels of each module, we use features of pairs of adjacent modules of a DM image to increase the accuracy of the data extraction; and (3) edge images are constructed and corrected by the proposed correction method based on the KM algorithm.  
The remaining parts of the paper are organized as follows: Section 2 introduces related works. Section 3 presents the graphic structure of the DM symbol. Section 4 introduces barcode image pre-processing, and Section 5 describes the proposed data exaction method. The experiment results and analysis are presented in Section 6. Finally, the conclusion of this work is drawn in Section 7.