Abstract
In recent years, the application of two-dimensional (2D) barcode is more and more extensive and has been used as landmarks for robots to detect and peruse the information. However, it is hard to obtain a sharp 2D barcode image because of the moving robot, and the common solution is to deblur the blurry image before decoding the barcode. Image deblurring is an ill-posed problem, where ringing artifacts are commonly presented in the deblurred image, which causes the increase of decoding time and the limited improvement of decoding accuracy. In this article, a novel approach is proposed using blur-invariant shape and geometric features to make a blur-readable (BR) 2D barcode, which can be directly decoded even when seriously blurred. The finder patterns of BR code consist of two concentric rings and five disjoint disks, whose centroids form two triangles. The outer edges of the concentric rings can be regarded as blur-invariant shapes, which enable BR code to be quickly located even in a blurred image. The inner angles of the triangle are of blur-invariant geometric features, which can be used to store the format information of BR code. When suffering from severe defocus blur, the BR code can not only reduce the decoding time by skipping the deblurring process but also improve the decoding accuracy. With the defocus blur described by circular disk point-spread function, simulation results verify the performance of blur-invariant shape and the performance of BR code under blurred image situation.
Keywords
Introduction
Mobile robots are widely used in indoor environments 1 and two-dimensional (2D) barcodes are popular for robots to detect and peruse the information. 2 Barcodes are used as a target of pursuing robot, 3 and as landmarks for distance measurement 4 or navigation. 5 As a timely, accurate, reliable, and economical data medium, 6 2D barcodes are widely used in many automation scenes in both industry and our ordinary life. 7 Commonly used 2D barcodes include QR codes, 8 Data Matrix, 9 and MaxiCode. 10 Using 2D barcodes for robot navigation has the advantages of low cost, simple installation, and easy modification to change the guide route when necessary. 11
However, the recognition rate of the 2D barcode falls when the distance between the reader and the barcode increases. 11 In addition, with the speed of the robot rising, the 2D barcode may decode failure. 12 The main reasons for the above problems are the motion blur and defocus blur of the image captured by the camera on a moving robot. In general, the speed of camera shutter is much faster than that of a robot, so the motion blur can be simplified to be the linear uniform motion degradation. 13 Defocus blur is usually described by circular disk point-spread function (PSF). 14 In practical applications, blurring is one of the common degradations in captured 2D barcode images and the identification and verification of the blurry 2D barcode images still remain a challenge. 15,16 Many methods have been proposed to deblur 2D barcode images. 16 –18 However, image deblurring is an ill-posed problem, 19 –21 and these deblurring methods suffer from expensive time cost due to complicated preprocessing and edge detection algorithms. 6 In addition, ringing artifacts are commonly presented in the deblurred image, 19 –21 which limits the improvement of decoding accuracy, or even reduces the decoding accuracy. In recent years, machine learning and deep learning are used in blurry 2D barcode images, 6,7 but these methods rely on the quality and large quantity of the image samples, which might not be applicable to the practical scenarios. 16
The 2D barcode images are very different from natural images, and they are usually composed of finder patterns and data regions. Finder patterns enable their positions to be quickly located and data regions encode data. Before the encoded data can be extracted and decoded correctly, extra information is needed, such as the orientation and size of the barcode, encoding parameters, version number, and so on, which is usually called format information, and can be stored in data regions, finder patterns, or both. The decoding process of the 2D barcode can be roughly divided into three steps: (1) detection and positioning; (2) extracting format information; and (3) extracting and decoding data. To successfully decode a 2D barcode from a blurry image, we generally do not need to restore all the details of the blurred image, because the data stored in the data regions are fault tolerant. The reason for decoding failure is often due to the destruction of the features of the finder patterns, which make the first step of the decoding process to unsuccessfully detect and locate the 2D barcode. As a result, finding a blur-invariant feature is the key to solve the above problems. The proposed finder patterns can improve the decoding performance of the 2D barcode without deblurring when the captured barcode image is blurred.
Blur invariant is based on the idea of direct analysis of the degraded blurry images.
14,22,23
A large number of related articles using this concept have been published.
24
In this article, we try to find out the shape and geometric features that are invariant to blur and used them to make up a blur-readable (BR) 2D barcode that can be decoded without deblurring. It is focused on the application scenario of low-speed robot and defocus blur is a main factor reducing the quality of captured images. Therefore, the remaining part of this article mainly deals with the recognition of the 2D barcode under defocus blur. Compared with the traditional approaches of deblurring the blurred 2D barcode image before decoding, the method proposed in this article has the following advantages: Quicker locating: The finder patterns of BR code are composed of blur-invariant shapes, which enable the BR code to be quickly located in a severely blurred image. On the contrary, the finder patterns of the ordinary 2D barcode cannot be located in a severely blurred image. Higher decoding accuracy: The format information of BR code is stored with blur-invariant geometric features, which can be retrieved correctly in a severely blurred image. With the correct format information, the data can be extracted more accurately from the BR code in a severely blurred image. Simulations show that the accuracy of decoding BR code in a severely blurred image is higher than that of QR code, even when the blurred QR code image is deblurred before decoding. Simpler decoding process: No deblurring is needed for decoding a BR code in a severely blurred image, whereas the QR code must be deblurred before decoding in a severely blurred image.
Blur-invariant shape and geometric features
Blur-invariant shape is the contour of a region in a binary image that can be directly restored to its original shape after being blurred. Let
where
To restore
The restored image is
If the contours of
The 2D barcode symbols are usually constructed as rectangle or circle forms. 8 –10 Therefore, we examine the possible blur-invariant shape of rectangular and circular regions. The defocus blur can be described by the circular disk model, 14 whose PSF is
where R is the blur radius.
Set
where M and N are the height and width of the rectangle
Their blurred images are
Suppose that the blur radius satisfies
the integral results are shown in Figures 1 and 2, respectively, where point

The sharp rectangular region

The sharp circular region
In Figure 1,
Therefore,
To derive blur-invariant geometric features, we decompose the binary image
where Uk is the support of
According to the theory of blur invariants,
22
if the PSF
the centroid coordinates of images, that is
are blur invariants, where
It is obvious that the PSF defined in equation (4) satisfies equation (11). Therefore, the centroid coordinates of
However, to ensure that
where Uk is the support of
Structure of BR code
The structure of the BR code is shown in Figure 3, including finder patterns and two data regions. The finder patterns consist of two parts: two concentric rings for locating the code and five disks for storing format information. When the data fill the data regions, the outer edges of the two concentric rings can be regarded as blur-invariant shapes, so they can be detected even under severe blur.

The structural diagram of a BR code symbol. BR: blur-readable.
The five disjoint disks A, B, C, D and O form two isosceles triangles (
The parameters of BR code with respect to the symbol version.
BR: blur-readable.
The two data regions are subdivided into circular data bands, which can be defined as concentric rings in the data regions, and are evenly divided into annulus to store data bits. A dark annulus presents one and a light annulus presents zero. The total number of the dark and light annulus is the raw data capacity of the BR code symbol. The parameters for each symbol version are presented in Table 1.
Simulation results
Three simulation cases are presented in this section. The first case is to verify the correctness of blur-invariant shape with rectangular and circular regions. The second case compares the performance of BR code decoding without deblurring and QR code decoding with deblurring. The third case tests the relationship between decoding performance and number of data bands for BR code under defocus blur condition.
In the first simulation case, rectangular and circular regions of size 800 × 800 pixels, defined in equations (5) and (6), respectively, are generated with
where
where
The compactness and irregularity of rectangular and circular regions are given in Table 2.
Compactness and irregularity of rectangular and circular regions.
The rectangular and circular regions are blurred with PSFs of different blur radius and then restored to a binary image, as defined in equations (1) and (3), respectively. In the simulation, it is easy to find out that

Compactness of restored rectangular and circular regions with respect to different blur radius.

Irregularity of restored rectangular and circular regions with respect to different blur radius.
In the second simulation case, we compared the decoding performance of BR code and QR code. The deblurring algorithm used here is based on Kullback–Leibler divergence (KLD),
17
which is one of the best nonlearning-based deblurring algorithms for QR code that can be found at present. The size of both QR and BR codes is

An example of the QR codes used in the simulation.

An example of the BR codes used in the simulation. BR: blur-readable.
The steps of the simulation process are as follows: Firstly, 30 samples of BR codes and QR codes with different contents are generated, respectively. Secondly, these 60 samples are blurred with defocus PSFs of different radius. Then, the 30 samples of blurred QR codes are deblurred using KLD. Thirdly, the blurred BR codes and the deblurred QR codes are decoded. The mean bit error rates (BERs) of the 30 samples for blurred BR codes and deblurred QR codes are shown in Figure 8, and the corresponding standard deviations are given in Table 3.

Decoding results for QR and BR codes with respect to blur radius. BR: blur-readable.
Standard deviations of 30 samples for the decoding BERs of blurred BR codes and deblurred QR codes with KLD.
BR: blur-readable; KLD: Kullback–Leibler divergence.
Since the maximum error correction level of most 2D barcodes is 30%, we believe that a barcode is impossible to be decoded successfully when BER is greater than 30%. It is clear that the blurred QR codes deblurred with KLD are able to be decoded when blurred radius is no greater than 19 (with the standard deviation less than 20%). The blurred BR codes are able to be decoded directly without deblurring when blurred radius is no greater than 23 (with the standard deviation less than 3%), which is 21% higher than that of QR codes. What is more, the BER of BR codes is less than that of QR codes when blurred radius is no greater than 24, which proves that blur-invariant shape and geometric features can improve the performance of 2D barcode with respect to defocus blur. In short, although the blurred QR code images are preprocessed by a deblurring algorithm, the BR code has better decoding performance than the QR code in the defocus blur situation.
In the third simulation case, we choose four different symbol versions, that is, 4, 6, 8, and 10, and for every version, 10 samples of BR codes with different data are generated. The BR codes are then blurred with defocus kernels of different radius. The decoding results for the blurred BR codes are shown in Figure 9. As in the last simulation, we choose BER less than 30% as the criterion of decoding success. The BR codes of versions 4 and 6 can be decoded successfully with a blur radius not greater than 24. The BR codes of version 8 can only be decoded successfully with a blur radius not greater than 14. The BR codes of version 10 can only be decoded successfully with a blur radius not greater than 9. Therefore, with the symbol version increasing, the data capacity and the number of data bands increase, and the decoding performance under severe blur decreases.

Decoding BERs for BR codes of various symbol versions with respect to blur radius. BR: blur-readable; BER: bit error rate.
Conclusion
In this article, to solve the problems of recognition rate decline and decoding failure for 2D barcode under defocus blur, the blur-invariant shape and geometric features are derived, and a BR code based on these features is presented. Formed by two blur-invariant concentric rings, the finder patterns enable BR code to be quickly located in blurred images. The format information of BR code is stored with blur-invariant geometric features, which can be retrieved correctly in a severely blurred image. Therefore, the BR can be directly decoded without deblurring even when seriously blurred. Simulation results verify the performance of blur-invariant shape and BR code under defocus blur. Compared with the QR code, the mean of maximum blur radii under which the BR codes can be successfully decoded is increased by 21% with lower standard deviation and BERs. It should be noted that only defocus blur is considered here. Its decoding performance under other types of blur, such as Gaussian and motion blur, can be further explored in the future.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by Science and Technology Planning Project of Guangdong Province (grant 2017B090908006).
