Autonomous Recognition System for Barcode Detection in Complex Scenes

: Linear barcode technology has been widely used in our common life, such as in logistics, retailed products and many other applications. Many researches and smart applications focus on how to decode the barcode so that it is difficult to locate precisely when the background becomes very complex. Moreover, many smart apps need human interaction to make sure the detected region is in a correct position of the screen. This paper presents an effective approach to locate the barcodes in real-time without manual disturbing. Basic morphological operations and Parallel Line Segment Detector (P-LSD) are applied to achieve the legal block of barcodes. Our method has been evaluated by a standard database and the experimental results show that our approach is more robuster than other earlier methods.


Introduction
Linear 1D barcodes are now present on the packaging of almost all retail products.Additionally, they are also widely used in the express logistic just as more and more people purchase their desirable items online.The barcodes are one-dimensional series of parallel lines that carry alphanumeric information which can be read using laser scanner, computers, cell phones etc [1].The alphanumeric Information are encoded in bars and spaces of varying widths along with redundant information for error correction, which is the main principle behind barcodes.These are a very advantageous and an efficient method of data representation.Obviously, the existing of barcodes can be of very big help in today's world where large amount of information is increasing exponentially [2].In order to precisely analysis the potential information of barcodes, we need to localize the barcodes quickly and robustly from the image captured by the camera.
Localizing barcodes means finding or locating barcodes in simple or complex images.It is mainly based on two main properties of barcodes.The main character of the barcode that many methods utilize during the barcode localization is that a barcode contains many parallel edges.The other property of barcodes indicates that it has a strong directional continuity.It is obviously means that barcodes have very strong continuity at one particular orientation and very low in all other orientations [4].
Many apps are currently available in many mobile application store which is a conveniently and helpfully way to read the barcode in people's common life.However, the current techniques also have many disadvantages that limit their usability, and similarly, their use in industry area.The main flaw of present system is that it is need for clean, close to the target images as much as possible, well framed.Moreover, present techniques expect the scanned region to look more like the flat bed.Additionally, they assume a human operator has already known the particular area of interest.In other word, current techniques do not localize them in large pictures, they only read them.
In this paper, we propose a new real-time method based on morphological operations and Parallel Line Segment Detector (P-LSD) for linear barcode detection of camera-captured images in the wild.We use the basic morphological operations to split the potential block which contains the area of barcodes.The tolerance will be occurred inevitably under adopting the preceding step as it is sensitive to light condition and blur and the loose value of threshold.Parallel Line Segment Detection, a fast method for barcode cropping, is proposed to modified this problem.We make sure the system is low computation and our plan achieves stateof-art results on the public datasets.processing techniques field.These forms contain the techniques based on the basic morphological operations, image scanning, distance transforms and bottom-hat filtering [2].Some of which come under Frequency Domain Methods while others come under Spatial Domain Methods.In the following paragraphs we will discuss previous approaches proposed to locate the barcode.
Methods based on Spatial Domain are those that search for set of dark lines on white background and that also have strong directional continuity at a specific angle so as to locate barcodes [3].Katona et al. [5] detected the barcodes based on the basic morphological.They also present another skill for both 1D and 2D barcode detection by using the space domain of parallel stripes in another paper.Other approaches like Tuinstra's using basic morphological operations to localize barcodes are relied on the fact that the bars can be highlighted by gradient calculation using sobel kernel due to high intensity difference between bars and the background [6].
Juett and Qi's method using primitive operators is based on Bottom-Hat filtering instead of edge detection.However, it takes more time than the previous method and this method needs a human interaction that it needs manually input optimal parameters although its results are more accurate [4].Telkin and Coughlan's method is based on scanning the image in four directions.It was designed mainly for blind people so as to` help them in their routine tasks [7].
Methods using wavelet transformation to look at images for barcode like appearance by a cascaded set of weak classifiers are based on Frefuency Domain Methods [8].Each classifier works in wavelet domain by searching for areas where may contain barcodes.Most of the currently available barcode reading applications identify, thus they usually require human to place the barcodes in a correct position within the camera screen.A. K. Jain and Yao Chen's proposed to use multi-channel Gabor filtering technique to locate barcodes at any orientation.This method can also locate them on both planar and curved surfaces.

Barcode Location
In this research work, our goal is to implement a barcode localization method which works well under different imaging conditions and for different test images.We use a different way based on detecting, filtering and line segmentation in this paper.On the top of that, we take advantage of Line Segment Detector introduced by [10].Various steps of our method are given in order.Fig. 1 is the framework of our method for detecting barcodes.

Barcode Estimation Using Morphological Operation
As proved in section 2, the texture information of a barcode is the most distinctive feature which can summarized by three descriptors: contrast, coarseness and directionality.Candidate area estimation based on the descriptor of contrast is realized in four steps: image preprocessing, segmentation and filtering, directional image open operation and candidate pickup.
Figure1.The Framework of our method for barcode location.

Image Preprocessing
In this step, the main tasks are to convert the input image into greyscale intensity image and to highlight the barcode bars against its background.GSF filter is applied to smooth the initial image which can remove the noise due to external factors.

Segmentation
Image segmentation is a common and traditional problem in the field of image processing.However, we adopt conventional thresholding segmentation instead of other progressive algorithm to find the possible block which contains barcode, as it is an easily and helpful way to get the interesting area if the background is distinct from foreground.In order to avoid the error, we pick up a weit threshold comparatively.After the above operator, we will achieve the potential area.

Directional Image Open Operation
In the case with complex background, segmentation results still contain many isolated edges in similar orientation.We use 5 5 square structuring element to perform dilation operator so as to merge the nearby areas so that a region contains the barcodes will be formed.

Candidate Pickup
These operators above will segment a huge number of candidate regions.We start eliminating the obvious false positives based on the aspect of the area and the aspect ratio of each blob.Each candidate block has its width wi, its height hi, Note that if the proportion and its height hi are too much smaller than the ordinary values we remove this potential region.
ITA 2017 Where G(k) is the the gradient magnitude of pixel k, R is the representation of line support region.The main rectangle's angle corresponding to the angle of the line is set to the angle of the eigenvector associated with the smallest eigenvalue of the matrix Many legible lines will be displayed after conducting the above steps.In this paper, we do not adopt the primary method to verify the validity of the lines.LSD method will outputs five parameters of segmented line, the start point, the end point, the width wi, the angle precision pi and the NFA [10].In this paper, we use the angle precision pi to distinguish the illegality of lines which is based on the main character that barcode has many parallel line edges.In the first step, we create a integer array ɛ to be used to store the angle parameter pi of each illegal line corresponding to the segmented block.The angle α of barcode's segmented edges is achieved by ranking and simple math statistics.Obviously, the segmented support region should have roughly the same angle and the distance between each other should not be too wide, so that a support score si is computed for each segmented block.where D is a basic function corresponding to the distance we denote and T is a setting threshold for judging.
Finally, the bounding box covering the segment region is computed.So the barcode is defined as the oriented bounding box centered in the rectangle center, with the width of rectangle as width and the height of rectangle as height.Fig. 3 shows the process of our method.

4
Experiments and Results

Datasets
In this section, we use a standard 1D barcode dataset, the WWU Muenster Barcode Database [11] to evaluate the performance of our proposed model.WWU has 1055 barcode images acquired by a Nokia N95 mobile phone and the size of the image is 640×480 pixels.

Results
Fig. 4 shows the results by different methods for detecting barcodes on original datasets.The first column is the original image, (a) column is Zamberletti's, b column is Tekin's, (c) is our result.
We have designed a framework and developed a system to implement our method in real-time.The desktop PC has an Intel Core i5-4670t CPU and 12 GB RAM, with Windows 7 system.The detailed performance results are shown in Table I and Table II.The accuracy of our approach for detecting barcode is 98.69 % and the consuming time is significantly reduced when compared to different methods in the WWU Muenster Barcode Database.We can see that our methods perform better than other methods whether the background is normal or complex.The methods of Tekin and Zamberletti are relied on the results of the Hough transform.In the presence of a more text intensive area, the performance of these methods will be in poor.Our methods has better robustness and can locate barcodes faster than the method of Refs [7][11].

Conclusion
We have presented an effective system to detect the region of the barcode and proved its effectiveness by using the standard dataset-WWU.The approach we proposed uses basic morphological operations and a Line Segment Detector to find the regions of barcodes.
The experiment results show that our approach is accurately to detect the barcodes whether the background is complex or not.Moreover, our method is verified to have the character of angle invariance.At the same time, the accuracy of location using our method is higher than other approaches applied in earlier research.

Figure 4 .
Comparison of experimental results with different approaches s d represent the score of angle and distance conditions respectively.