# 1D Barcode Detection via Integrated Deep-Learning and Geometric Approach
## 2 Related Work  
In recent years, methods focusing on barcode detection have developed rapidly in the computer vision community. Previous approaches required users to manually center and align the camera with the target barcode before detection to achieve a better performance. To improve efficiency, recent works have focused more on an interaction-free solution, enabling barcode detection to be fully automatic. The first barcode detector based on morphological operators was proposed by [PERSON] et al. [9]. Different approaches based on geometry are widely adopted. [PERSON] et al. [3] find a candidate line segment in the barcode which crops the region in orthogonal direction by intensity value. [PERSON] et al. [4] estimate whether the line segments, transformed from the outer contours, fit the bar description by length and orientation. [PERSON] et al. [10] use maximally stable extremal regions (MSERs) to eliminate the background noise and detect the direction of the barcode. The aforementioned works are all based on the graphic feature that a 1D barcode is composed of, i.e., a series of thin and thick bars, and so detect the line segments and the apparent gradient change in the orthogonal direction. These methods are accurate in 1D barcode region extraction and perform well in benchmark datasets such as [PERSON] et al. [5], with the 1D barcodes images captured in a close distance; however, there still exists a localization problem. In various industrial applications, it is necessary to process a high-resolution image where 1D barcodes may appear in a small region, which makes localization of the 1D barcodes difficult especially when the background texture is complex. Increasing the image size also caused a rise in computational cost, which directly influences the speed. Deep-learning-based approaches deal with localization tasks well. Many methods based on deep learning have been proposed, such as in [5], where they use a multi-layer perceptron (MLP) neural network in the 2D Hough transform domain to find potential bars. [PERSON] et al. [6] use an object detection network to locate the barcodes and another subsequent network to predict the rotation angle of the 1D barcode in the bounding box region. Further segmentation of the 1D barcode is not proposed by [PERSON] et al. [6]. With the pure 1D barcode region extracted, many image processes, such as distortion correction [11], can be applied to help decode the 1D barcode. Although there exist 2D object detection instance segmentation approaches such as Mask-RCNN [12], a tiny defect in 1D barcode segmentation may cause completely different decoding results; however, the mean average precision (mAP) [12] is still high. Therefore, we propose to use a geometric approach to solve the segmentation problem and combine it with a deep-learning approach to solve the localization problem. Related methods that we use in this work are the object detection network and line segment algorithm. The object detection task involves the detection, classification, and localization of one or more target objects in an image; this marks objects with bounding boxes and gives them a category [13; 14]. Object detection models are mainly built using a deep convolutional neural network, which has excellent performance in graphics processing [14]. The YOLO detection network [7; 15; 16] is a representative model famous for its speed, which directly predicts four values to describe a bounding box [16]. Compared to other detection systems such as RetinaNet [17] and DSSD513 [18], YOLO performs faster and better. The line segment detection algorithm (LSD) [4] is a fast line segment detector which does not require one to manually tune the parameters for each image. In essence, LSD is a region growing algorithm; each region starts with just one pixel and the region angle set to the level-line angle at that pixel (orthogonal to the gradient angle).