# Data Extraction Method for Industrial Data Matrix Codes Based on Local Adjacent Modules Structure
## 2 Related Works  
To the best of our knowledge, known decoding algorithms, such as ZBar, ZXing, and libdmtx, cannot directly recognize degraded barcode symbols. So, some studies grade barcode quality through quality evaluation methods and then directly reject recognizing low-quality barcodes by decoding software. ISO-15415 [7] and ISO-16022 [8] classify the quality of 2D Data Matrix symbols into 5 grades based on some hand-crafted features. [PERSON] et al. proposed a no-reference quality measure method for 2D barcodes captured by the mobile phone in order to reject the low-quality symbols [9]. They further improved their work and proposed a method of reduced-reference quality metric [10]. However, these methods are limited to barcode symbols with blur and illumination artifacts. [PERSON] et al. [5] classified the distortion types and quality levels of low-quality barcode images by deep learning networks and then used different pre-processing methods to improve barcode recognition efficiency.  
Some traditional decoding apparatuses based on machine vision, such as KEYENCE SR-1000 [4], and COGNEX DataMan [11], have proposed a few pre-processing methods suitable for low-quality barcode symbols. For example, KEYENCE SR-1000 captures sample images from it by adjusting exposure time, optical gain, and polarization filter. Then, each  
Figure 1: Some low-quality Data Matrix symbols: (**a**) exposure to aggressive environments; (**b**) uneven lighting; (**c**) curved surface; (**d**) low contrast; (**e**) rich texture; (**f**) blur.  
filtered image, which is processed by common image filters, is passed to the decoding step to judge if the symbol can be recognized successfully.  
Binarization is the most common pre-processing method for barcode images. Using a suitable binarization algorithm to pre-process the barcode image can improve the quality of the barcode image and facilitate the extraction of barcode data. [PERSON] et al. [12] used the average gray level in a neighborhood surrounding each pixel as the threshold on the basis of modifying the Niblack algorithm. [PERSON] et al. [13] enhanced image contrast by Niblack algorithm, followed by thresholding using [PERSON]'s method. [PERSON] et al. [6] employed a threshold to process the barcode video images. [PERSON] et al. [14] divided the barcode image into four blocks and normalized each block, accounting for the varying lighting conditions. Then, a fixed threshold was obtained to binarize the normalized image. [PERSON] et al. [15] proposed a binarization method using the local window of adaptive location and size for low-quality barcode images captured by mobile phones. The latest binarization algorithm has been proposed. [PERSON] et al. [16] presented a binarization based on pre-processing and fuzzy C-means (FCM) clustering for low-quality ESPI fringe patterns. [PERSON] et al. [17] proposed a modified bi-level thresholding (MBET) algorithm based on contrast enhancement and edge filtering. [PERSON] et al. [18] combined neural networks and DA in order to carry out unsupervised document binarization. The above binarization algorithms can improve the quality of printed barcodes with non-uniform illumination, but they are not effective for low-quality barcodes marked on metal surfaces.