Next Article in Journal
Complexity Effective Sampling Frequency Offset Estimation Method for OFDM-Based HomePlug Green PHY Systems
Next Article in Special Issue
An Iterated Hybrid Local Search Algorithm for Pick-and-Place Sequence Optimization
Previous Article in Journal
New Stability Criterion for the Dissipative Linear System and Analysis of Bresse System
Previous Article in Special Issue
Evolutionary Hierarchical Sparse Extreme Learning Autoencoder Network for Object Recognition
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Novel Aesthetic QR Code Algorithm Based on Hybrid Basis Vector Matrices

1
School of Computer Science and Technology, Hangzhou Dianzi University, Hangzhou 310018, China
2
Department of Information Engineering and Computer Science, Feng Chia University, Taichung 40724, Taiwan
*
Author to whom correspondence should be addressed.
Symmetry 2018, 10(11), 543; https://doi.org/10.3390/sym10110543
Submission received: 21 September 2018 / Revised: 18 October 2018 / Accepted: 20 October 2018 / Published: 25 October 2018
(This article belongs to the Special Issue Symmetry in Computing Theory and Application)

Abstract

:
Recently, more and more research has focused on the beautification technology of QR (Quick Response) codes. In this paper, a novel algorithm based on the XOR (exclusive OR) mechanism of hybrid basis vector matrices and a background image synthetic strategy is proposed. The hybrid basis vector matrices include the reverse basis vector matrix (RBVM) and positive basis vector matrix (PBVM). Firstly, the RBVM and PBVM are obtained by the Gauss–Jordan elimination method, according to the characteristics of the RS code. Secondly, the modification of the parity area of the QR code can be applied with the XOR operation of the RBVM, and the XOR operation of the PBVM is used to change the data area of the QR code. So, the QR code can be modified to be very close to the background image without impacting the error-correction ability. Finally, in order to further decrease the difference between the QR code and the background image, a new synthesis strategy is adopted in order to obtain a better aesthetic effect. The experimental results show that it obtains a better visual effect without the sacrificing recognition rate.

1. Introduction

A QR code is a kind of two-dimensional code that can encode information that is generally encoded by RS (Reed-Solomon) coding theory [1,2,3]. It was invented in Japan in 1994, and became popular due to its fast decoding speed. The QR code has been widely used in many fields with the development of the mobile internet. However, customers are not satisfied with the traditional QR code appearance, which only has black and white modules and a non-aesthetic visual effect. Therefore, researchers have increasingly concentrated on the generation and development of an aesthetic QR code in recent years.
In the early research work on aesthetic QR codes, some researchers tried to change the color or shape of the QR code modules, or embed an image into the QR code; all of these operations can improve the visual effects of the input QR code [4] (as shown in Figure 1).
At present, the most widely used method to beautify QR codes is embedding an image, which can be divided into two categories. One is based on the pixel processing. First, the appropriate position of the embed image is determined, and the fusion operation is conducted for the image into the QR code. The main advantage is that it can overlay the image on the QR code directly [5,6,7,8]. However, these methods can only handle very small images; so, the visual effect of the aesthetic QR code is not very satisfactory. Another way to beautify the QR code involves the processing of QR code modules. These modules are the smallest units of the QR code, and a better visual effect can be achieved by modifying the modules [9,10,11,12,13,14,15,16,17,18]. Most of the visual effects in earlier studies were not satisfactory.
An optimization model was introduced to beautify the QR code in Fang et al. [12]. The main contribution laid in the following two aspects: the first proposed the visual distance function, and the other used the estimation function to reduce the number of bit errors. The algorithm reduced the visual distance between the QR code and the background image in order to obtain a better visual effect. However, the regions of interest, which are an important part of the QR code, were not considered during the replacement process, which led to the poor visual effect of the image.
In recent years, some scholars have embedded images into the QR code based on the characteristics and mechanism of the RS code, which can achieve a better aesthetic effect. In Kuribayashi et al. [15], the authors proposed two view points: the center area of the QR code is more important than the edge area, and the area of the image that is not encoded with information is not sensitive to the modification of pixels. Based on the above two points, a weighting function was proposed to control the RS code in the central region of the image. Sub-modules were proposed to describe the modules in the matrix format. The edge regions were covered by black and white points of the QR code and timing pattern, which reduced the visual effect of the entire image. Even so, this strategy obtained a better visual effect of the QR code without sacrificing its error-correcting capability.
In Lin et al. [19], a two-stage algorithm to beautify the QR code was proposed. First, they applied control bits to ensure the decoding ability of the QR code, which is based on the Gauss–Jordan elimination method. Secondly, a rendering method based on an ellipse alpha mask was used to improve the visual quality without reducing the decoding ability. The overall visual effect was good, but the edge area of the image still had traces of the input QR code, and the integrity of the embedded image was thus damaged.
In our previous work, an algorithm for generating an aesthetic QR code based on the error-correction mechanism of RS code was proposed [20]. Its main contributions included taking advantage of the error-correction coding principle and the characteristic of RS code, combined with saliency detection technology. It highlighted the important areas of the image, so that the region of interest (ROI) could be completely displayed. The experimental results showed that there were almost no noise pixels on the saliency region. The main drawback was that the replacement area was limited by the error-correction capacity. (The result images of the aesthetic QR code in some papers are shown in Table 1).
In this paper, a new method on the basis of our previous paper [20] is proposed. The main contributions are introduced as follows:
  • The construction of the RBVM and the PBVM are extended from the basis vector matrix that was proposed by Cox [21]. Compared with the aesthetic methods, which are limited in our data area, our algorithm can achieve the replacement of the data area and the parity area of the QR code by the hybrid basis vector matrices of the PBVM and the RBVM. Thus, the replaceable area of the background image is extended. PBVM or RBVM can be flexibly chosen to obtain the optimal aesthetic effect for different image content.
  • An image-synthetic strategy is proposed based on the alpha mask of several different shapes, which can reduce the difference between the QR code and the background image, and make the QR code more pleasant.
  • In order to reduce the modification effect on the data area while modifying the parity area, an evaluation mechanism is designed on the basis of the Lasso principle [22] to determine which bits of parity area are the most appropriate to be modified.

2. Overview

The proposed algorithm adopts the data structures of the PBVM and the RBVM to modify the RS code. Both of the basis vector matrices are used to perform XOR operation with the input QR code to reduce the differences between the QR code image and the background image. Finally, the replaceable area of the aesthetic QR code is maximized. The RS code-encoding mechanism and the XOR operation are described in this section.

2.1. RS Code-Encoding Mechanism

The QR code usually uses the error-correction coding mechanism of the RS code to correct the errors. The QR code is divided into 40 versions, according to the image size. Version 1 consists of 21 × 21 modules. Four QR code modules will be added to each side compared to the previous version. In different versions of the QR code, each version of the QR code has four error-correction levels, expressed with L, M, Q, and H. The corresponding error correction capacity is 7%, 15%, 25%, and 30%, respectively. For example, if the error-correction capacity is 7%, that means the error can be automatically corrected if the error message length does not exceed 5% of the total length. So, if only the RS error-correction coding mechanism is used to beautify the QR code, the exposed area is limited by the error-correction capacity. The maximum display area is 30% for this type of method [23].
The generation process of the QR code with the RS code is presented as follows. First, the length of data area is k in the RS code according to the input information, which determines the version and the error-correction level of QR code. Second, the input texts are encoded into code words based on the encoding mechanism of the RS code. These input texts are considered the valid data area with the length m. If the code words can’t completely fill the data area, a terminator (0000) is adopted for the left position, which is called the padding bits. The padding bits are used to fill the free data area known as the invalid data area, and its length is km. Moreover, the RS code generates t parity bits according to k data bits. Finally, the generated RS code (including m valid data bits, km padding data bits, and t parity bits) combining with the timing pattern and the alignment pattern perform XOR operation with a mask; then, the standard QR code is generated.
The distribution of the RS code in the QR code is shown in Figure 2. The pink and green parts are the data area with a length of k, the orange part is the parity area with a length of t. The remaining parts are filled by the timing pattern and the alignment pattern. Among them, the pink part is the valid data area with a length of m, and the green part is the padding data bits with a length of km after the terminator.

2.2. XOR Operation of RS Code

The XOR operation in this paper is to reduce the visual differences between the QR code and the background image. According to the literature [21,24], the RS code has the features of XOR operation, which means that a new RS code can be acquired using two different RS codes by performing an XOR operation. The new RS code still conforms to the standard form. For example, given the following RS codes with data bits k = 3 and parity bits t = 2, the two RS codes are RS1 = 10010, RS2 = 01011; then, the XOR operation is performed to get a new RS code RS3 = RS1 RS2 = 11001. It also can be observed RS3 is also a valid RS code.
The flowchart of our aesthetic algorithm is shown in Figure 3. Take a background image IO, which needs to be preprocessed into the image IP. The goal is to get the aesthetic QR code IR, which is fused by the image IP and the QR code IQ. At the same time, IR can be decoded correctly, and has maximum approximation with the image IP in the visual effect. First, a corresponding RS code will be generated according to the encoding mechanism, and the generated RS code combined with the timing pattern and the alignment pattern will be performed with a XOR operation with mask; then, the standard QR code IQ is generated. Then, IP is transformed into gray image IG through the gray-scale transformation, and both IP and IG are scaled into the same size compared to IQ. Second, IG is compared with IQ module by module, and then covered with the image when in the same module, and the XOR operation is performed by PBVM when it is in a different module. In this step, the result of PBVM IRP is generated. Then, an aesthetic QR code IAP can be obtained by the synthetic strategy of IP and IRP. This is also a common aesthetic QR code. Our main contribution is to get IRR which is obtained by performing an XOR operation by RBVM according to the evaluation mechanism on the basis of the above operation. Third, the final aesthetic QR code IR is obtained by a synthetic strategy with IRR and IP. The aesthetic process will be introduced in detail in the following section.

3. Algorithm

3.1. Preprocessing of Background Image

The binary methods are different in various QR decoders. Influenced by illumination, a black module may be decoded into a white module, or a white module may be decoded into a black module in the decoding process. To increase the decoding rate of the aesthetic QR code, it is necessary to preprocess the background image to avoid some binary errors.
First, the background image is converted from a red–green–blue (RGB) color space to Lab color space, and the luminance channel (L channel) is extracted. Secondly, a binary threshold value V a is obtained by Otsu’s [25] method on the L channel. V a is our estimated value, and the actual threshold value will fluctuate between [ V a h / 2        V a + h / 2 ] , where h is an experimental parameter. The big h value will be good for the image binarization result, but it will reduce the original image quality. In the experiment, we find that setting H to 1/10th of V a can better balance the image quality and binarization effect. So, the pixels in the red box of Figure 4 are easy to cause errors in the binary process. Finally, these pixels in [ 0         V a ] are linearly remapped to [ 0         V a h / 2 ] , and the pixels in [ V a        255 ] are remapped to [ V a + h / 2         255 ] . The flowchart is shown in Figure 4. The left column is the background image, and the other two columns are histograms and an aesthetic QR code.

3.2. Construction of PBVM and RBVM

As shown in Figure 5, PBVM is a matrix with k rows and d columns (d = k + t). Each row of the matrix is a valid RS code; the previous k bits belong to the data area, and the rear t bits belong to the parity area. The left sub-matrix of the PBVM is the identity matrix, which is marked in an orange color. The content of the right sub-matrix, which is marked in a blue color, is generated by the corresponding data bits in the same row according to RS coding theory. The PBVM can be used to modify the data area of the RS code. The RBVM is constructed by the matrix transformation of the PBVM. We choose t rows of PBVM to form a new matrix and perform the Gauss–Jordan elimination method [21]. As the result, we get the RBVM with t rows and d columns (d = k + t), and its right sub-matrix is the identity matrix (as shown in Figure 5b). Similarly, the previous k bits belong to the data area, and the rear t bits belong to the parity area. The RBVM is used to modify the parity area of the RS code.
Here, we illustrate how to modify the data bits and parity bits in the RS code by the PBVM and RBVM. If the ith-bit in the data area of the RS code rs needs to be modified, then the corresponding ith-row of the PBVM is selected to perform the XOR operation on rs. The result rs’ is still a valid RS code with ith-bit changed. For example, consider when the RS code rs = 1011011, whose data area length k = 4 and parity area length t = 3. We want to change third bit of rs. So the third row of the PBVM is selected, and we performed the XOR operation on rs to get a new RS code rs’. The process is shown in Figure 6a, and we can see that the third bit of rs is changed from 1 to 0.
If we want to change the bits in the parity area of the RS code, we should use the RBVM. Here is another example. We want to change the second bit of the parity area (sixth bit of the total area) of rs. So, the second row of the RBVM is selected, and we performed the XOR operation on rs to get a new RS code rs’. The process is shown in Figure 6b, and we can see that the second bit of the parity area (the sixth bit of the total area) of rs is changed from 1 to 0.
Figure 7 shows the results by using the PBVM and RBVM on the QR code. The PBVM makes the data area of the QR code covered by a background image completely (the region in the red box in Figure 7a), and the RBVM can make the parity area of the QR code completely covered by a background image (region in the yellow box in Figure 7b). The hybrid matrices with the PBVM and RBVM can be applied to get a better visual result on the aesthetic QR code, which has not been used in the previous research.

3.3. Replacement of QR Code Module

In Figure 8, we show the replacement process of the QR code module of the original QR code IQ according to the gray image IG. The whole process is divided into two steps. First, the original QR code IQ is applied to the PBVM according to the blocks in the red box of the gray image IG. For each block in IG, if the average of the pixels is greater than the threshold Vo, the corresponding module of the input QR code IQ will be changed to be white. Otherwise, the corresponding module of IQ will be changed to be black.
After the PBVM operation, the result image is obtained as IRP in Figure 8. Secondly, similar operations are performed on the result image IRP according to the yellow box of the gray image IG. The final result image is shown as IRR in Figure 8.
The pseudo-code for the steps is described as following. First, we process the blocks in the red area of IG, and then the blocks in the yellow area (Algorithm 1).
Algorithm 1.
1.Threshold value Vo is obtained by the Otsu method.
2. For each block in the data area and parity area of the QR code IQ (as shown in red and yellow box)
3.   get average Va of pixels in corresponding block of gray image IG
4.   if Va > Vo then
5.      Set corresponding module of IQ to white
6.   else
7.      Set corresponding module of IQ to black
8.end
However, the modification of the parity area will always affect the data area. In order to reduce the modification effect on the data area, an improved evaluation mechanism is designed on the basis of the Lasso principle [22] to determine which bits of the parity area are the most appropriate to be modified. Formulating the above idea as a (0–1) programming model of the following function:
{ Optimzation   variables : C = ( C 1 , C 2 , , C t ) arg   min C { i = 1 t ( C i f i ) I R P I G 2 + C 1 }
where C is the vector that determines which bit in the parity area should be modified. If C i equals 1, the ith-bit in the parity area should be modified; otherwise, it should not be modified. The sum of C i f i (i from 1 to t) represents all of the vectors selected from the RBVM, where t is the length of the parity area of the QR code. Then, these vectors are used in the XOR operation with the QR code I R P processed by the PBVM. The term I G represents the background gray image. The objective function includes two terms: the first term is used to describe the difference between the modified QR code and the background gray image I G by L2 distance, and the second L1 distance of C represents the numbers of 1 in vector C.
By solving Equation (1), we can obtain an optimal solution C , which represents the bits to be modified in the parity area of the QR code. Based on C , we make the smallest influence on the data area. The results are shown in Figure 9:
This paper is the first time that we have proposed the hybrid basis vector matrices combining the RBVM and the PBVM, which allow us to modify the whole QR code. It is an effective way to modify the data area and the parity area. The proposed algorithm can handle three different cases: data area modification, parity area modification, and mixed modification. The result images of the three cases are shown in Figure 10. It can be seen from the experimental results that mixed modification obtains the best result.

3.4. Synthetic Strategy of Background Image and QR Code

After the above-mentioned operations are executed, the QR code has achieved preliminary aesthetic effect. However, the previous results are not satisfactory. The background image should be perfectly synthesized with the preliminary processed QR code. Therefore, we apply the synthetic strategy proposed in Li et al. [20] to our work. The synthetic strategy formula is described as follows:
Q = { 0 , T i < T 0 N i = 0 , 1 , T i > T 0 N i = 0 , 1 , T i < T 0 N i = 1 , 0 , T i > T 0 N i = 1.  
where Q = 0 represents that the QR code module will be completely replaced with the corresponding block of the background image; Q = −1 or 1 represents whether the central area of the specified QR code module is kept unchanged, or whether the other area of the specified module is replaced with the corresponding area of the background image. T i represents the average of the pixels in the block of the background image I G . T 0 represents the binary threshold, which is obtained by Otsu’s method. N i is the module of the QR code, N i = 1 represents a white block, whereas N i = 0 represents a black block.
In order to further increase the aesthetic effect, when Q = 1 or −1, the central area can be replaced by specific alpha masks that contain diamond, rhombus, star, and so forth. The use of these alpha masks can improve the visual effect and enrich the diversity of an aesthetic QR code. The aesthetic QR codes with star and rhombus masks are shown in Figure 11, respectively.
Since the error-correction coding mechanism of the RS code is used in our algorithm, the error-correction capability of the QR code is not reduced. Therefore, we can use the error-correction mechanism of the QR code to further enhance the aesthetic effect of the QR code.

4. Experimental Results

4.1. Integrity Test of the Aesthetic QR Code

The PBVM and RBVM allow us to modify the data area and parity area simultaneously in the QR code; the final replaceable area is larger than most of the previous research in the aesthetic QR code, and has a better visual effect. Moreover, the replaceable areas can be dynamically adjusted according to the image content. The comparison of our algorithm of the aesthetic QR code and the algorithms in Lin et al. [19] is shown in Table 2. The experimental results show that our algorithm has advantages in the following aspects:
(a)
Retaining the integrity of the background image in the aesthetic QR code.
(b)
Adjusting the replaceable areas dynamically.
(c)
Getting rid of the block effects around the aesthetic QR code in Lin et al. [19].

4.2. Error-Correction Rate of Aesthetic QR Code

The test results of the error-correction rate of our algorithm are shown in Table 3. In the experiment, the aesthetic QR code is generated by the QR code with version 5, and the error-correction level L. So, the total length of the QR code is 134 bytes, the length of the data code words is 108 bytes, and the length of the parity code words is 26 bytes. We tested our algorithm on three types of image data sets with 1200 images. The experimental results show that the error rate of the simple cartoon images is less than the complex scene images. The reason that we analyzed this is that the binarization process of the cartoon images is more accurate than the scene images. However, the maximum error-correction capability of the QR code when using version 5 and the error correction level L is approximated as 26/2/134 × 100% = 9.7%. The average error-correction rate is much less than the maximum error-correction capability in these tests. That means that our algorithm for an aesthetic QR code only slightly affects the error-correction capability.
We can use the error-correction mechanism of the QR code to further enhance the aesthetic effect on the basis of the existing results. In Figure 12, by comparing the two images, you can find that the black points are removed from the red box after using the error-correction capacity.

4.3. Subjective Visual Effect of Aesthetic QR Code

In order to evaluate the performance of the proposed algorithm, 40 volunteers took part in the subjective visual effect test. The experimental process in Li et al. [20] is repeated. Different images are chosen as the input image for embedding the text “www.hdu.edu.cn” with four methods, including the methods in Huang et al. [11], Cox et al. [21,26] and our method. The QR code uses version 5 and error correction level L. The experiment requires each individual to rate the aesthetic QR code (the test cases are shown in Table 4) in terms of the visual aesthetic attraction, the similarity with background image, and the integrity of background image, respectively. Scores range from 1 to 10 (1 means less satisfaction, 10 means excellent). The results are shown in Figure 13.
Our method outperforms the methods in Huang et al. [11], Cox et al. [21,26] in the aspect of the visual aesthetic attraction, the similarity with background image, and the integrity of background image. Also, our method can replace the larger area of the QR code with a more complete background image, and thus obtain a better visual effect.

4.4. Objective Visual Effect of Aesthetic QR Code

In order to evaluate the similarity between the aesthetic QR codes generated by different algorithms (Huang et al. [11], Cox et al. [21,26] and ours) and the background image, the RGB-based color distance of all of the pixels in the region of interest (ROI) is calculated and listed in Table 5. The result images of the aesthetic QR codes generated by different algorithms are shown in Table 4. The quantitative experimental results in Table 5 show that our distance is the shortest. That is to say, the aesthetic QR code generated by our algorithm contains less noise, and its visual effect is better than those of the other algorithms.

4.5. Correctness of QR Code Decoding

The correctness of decoded messages is evaluated by three different mobile devices (HUAWEI Honor 7, MI 5, and iPhone 6) with QR code decoders (Wo Cha Cha, WeChat, and QRcode Scanner, respectively; in addition, the i-nigam is used by iPhone 6). We test 100 different images of aesthetic QR codes and some of the images are listed in Table 6. The quantitative results are shown in Table 7. From the experimental results, we can see that our algorithm obtains high decoding rates in most of the samples. The decoding rates in paper Garateguy et al. [16] and Lin et al. [19] are also very high. Although the test results are affected by the environment, mobile application, scanning distance and angle, etc., the differences between the various beautification methods cannot be well reflected. In generally, all of the algorithms can achieve a good decoding effect in the test [16,19,20].

4.6. The Influence of Lighting Condition and Scanning Angles

For each aesthetic QR code generated by our algorithm, a series of experiments were conducted under different light and scanning angles, respectively. Firstly, we simulated the decoding rates of an aesthetic QR code under different light by adding an intensity value l (l = −60, −40, −20, −10, 0, +10, +20, +40, +60). The decoding rates under different light conditions are shown in Figure 14a. Secondly, we simulated the decoding rates of an aesthetic QR code under different scanning angles by rotating the generated aesthetic QR code with out-of-plane rotation angle r (r =10°, 20°, 30°, 40°, 50°, 60°, 70°). The decoding rates under different scanning angles are shown in Figure 14b.
From the decoding rates under different light conditions and scanning angles in Figure 14, we can conclude that the aesthetic QR code can be correctly decoded in the circumstances of sufficient light. However, we cannot ensure that the aesthetic QR code can also be decoded under the condition of insufficient light or excessive light. Also, the aesthetic QR code can be correctly decoded within 30 degrees. Otherwise, the decoding rates will decline quickly.

5. Conclusions

In this work, a new algorithm was proposed based on the XOR mechanism of hybrid basis vector matrices and background image synthetic strategy. It can generate aesthetic QR codes with high quality visual effects, and can display a larger background image compared with the previous methods. Among them, the use of the XOR mechanism mainly includes the use of the PBVM and RBVM, respectively. This strategy is used to implement the complete replacement of the background image. Thus, a larger area of background image is obtained.
Our algorithm can use the PBVM, RBVM, or hybrid basis vector matrices according to the different image content and the evaluation mechanism. In addition, our algorithm will not affect the error-correction capacity of the QR code. Therefore, we can achieve a better aesthetic effect combination with the error-correcting mechanism.
Further research can be focused on how to better combine the error-correction mechanism, evaluation mechanism, and hybrid basis vector matrices operation. Some beautification evaluation mechanisms based on artificial intelligence can also be used in future research.

Author Contributions

J.L. designed the algorithm; W.C. conducted the experiments and wrote the paper; S.Z. and L.L. analyzed the results; Z.Y. and C.-C.C. provided helpful suggestions.

Funding

This research was funded by the National Natural Science Foundation of China (Grant No.61370218), the Public Welfare Technology and Industry Project of Zhejiang Provincial Science Technology Department (Grant No. GG19F020033 and No. LGG18F020013).

Conflicts of Interest

The author declare no conflicts of interest.

References

  1. Kan, T.W.; Teng, C.H.; Chou, W.S. Applying QR code in augmented reality applications. In Proceedings of the VRCAI ’09 8th International Conference on Virtual Reality Continuum and its Applications in Industry, Yokohama, Japan, 14–15 December 2009; pp. 253–257. [Google Scholar]
  2. Nikolaos, T.; Kiyoshi, T. QR-code calibration for mobile augmented reality applications: Linking a unique physical location to the digital world. In Proceedings of the SIGGRAPH ’10 ACM SIGGRAPH 2010, Los Angeles, CA, USA, 26–30 July 2010; p. 144:1. [Google Scholar]
  3. Reed, I.S.; Solomon, G. Polynomial Codes Over Certain Finite Fields. J. Soc. Ind. Appl. Math. 1960, 8, 300–304. [Google Scholar] [CrossRef]
  4. Falcon, A. 40 Gorgeous QR Code Artworks That Rock. 2013. Available online: http://www.hongkiat.com/blog/qr-code-artworks/ (accessed on 10 November 2017).
  5. Wakahara, T.; Yamamoto, N. Image processing of 2-dimensional barcode. In Proceedings of the 14th International Conference on Network-Based Information Systems, NBiS 2011, Tirana, Albania, 7–9 September 2011; pp. 484–490. [Google Scholar]
  6. Toshihiko, W.; Noriyasu, Y.; Hiroki, O. Image processing of dotted picture in the QR code of cellular phone. In Proceedings of the International Conference on P2P, Parallel, Grid, Cloud and Internet Computing, PGCIC, Fukuoka, Japan, 4–6 November 2010; pp. 454–458. [Google Scholar]
  7. Ono, S.; Morinaga, K.; Nakayama, S. Two-dimensional barcode decoration based on real-coded genetic algorithm. In Proceedings of the IEEE Congress on Evolutionary Computation, CEC (IEEE World Congress on Computational Intelligence), Hong Kong, China, 1–6 June 2008; pp. 1068–1073. [Google Scholar]
  8. Baharav, Z.; Kakarala, R. Visually significant QR codes: Image blending and statistical analysis. In Proceedings of the 2013 IEEE International Conference on Multimedia and Expo (ICME), San Jose, CA, USA, 15–19 July 2013; pp. 1–6. [Google Scholar]
  9. Fujita, K.; Kuribayashi, M.; Morii, M. Expansion of Image Displayable Area in Design QR Code and Its Applications. Inform. Sci. Technol. Forum Conf. Pap. 2011, 10, 517–520. [Google Scholar]
  10. Lin, Y.H.; Chang, Y.P.; Wu, J.L. Appearance-based QR code beautifier. IEEE Trans. Multimed. 2013, 15, 2198–2207. [Google Scholar] [CrossRef]
  11. Chu, H.K.; Chang, C.S.; Lee, R.R.; Mitra, N.J. Halftone QR codes. ACM Trans. Graph. 2013, 32, 217:1–217:8. [Google Scholar]
  12. Fang, C.F.; Zhang, C.W.; Chang, E.C. An optimization model for aesthetic two-dimensional barcodes. MultiMedia Modeling. In Proceedings of the 20th Anniversary International Conference, MMM 2014, LNCS8325, Dublin, Ireland, 6–10 January 2014; Springer International Publishing: Cham, Switzerland, 2014; pp. 278–290. [Google Scholar]
  13. V. Company, V. Visual QR Code. 2018. Available online: http://www.visualead.com/ (accessed on 21 September 2018).
  14. E. Company, E. Egoditor UG. 2018. Available online: https://www.qr-code-generator.com (accessed on 21 September 2018).
  15. Kuribayashi, M.; Morii, M. Enrichment of Visual Appearance of Aesthetic QR Code; IWDW 2015, LNCS 9569; Springer: Cham, Switzerland, 2016; pp. 220–231. [Google Scholar]
  16. Garateguy, G.J.; Arce, G.R.; Lau, D.L.; Villarreal, O.P. QR images: Optimized image embedding in QR codes. IEEE Trans. Image Process. 2014, 23, 2842–2853. [Google Scholar] [CrossRef] [PubMed]
  17. Li, L.; Li, Y.Y.; Wang, B.; Lu, J.F.; Zhang, S.Q.; Yuan, W.Q.; Wang, S.J.; Chang, C.C. A New Aesthetic QR Code Algorithm Based on Salient Region Detection and SPBVM. In Security with Intelligent Computing and Big-Data Services; SICBS 2017; Peng, S.L., Wang, S.J., Balas, V., Zhao, M., Eds.; Springer: Cham, Switzerland, 2018; pp. 20–32. [Google Scholar]
  18. Kuribayashi, M.; Morii, M. Aesthetic QR code based on modified systematic encoding function. IEICE Trans. Inf. Syst. 2017, E100-D, 42–51. [Google Scholar] [CrossRef]
  19. Lin, S.S.; Hu, M.C.; Lee, C.H.; Lee, T.Y. Efficient QR code beautification with high quality visual content. IEEE Trans. Multimed. 2015, 17, 1515–1524. [Google Scholar] [CrossRef]
  20. Li, L.; Qiu, J.X.; Lu, J.F.; Chang, C.C. An aesthetic QR code solution based on error correction mechanism. J. Syst. Softw. 2015, 116, 85–94. [Google Scholar] [CrossRef]
  21. Cox, R. Qartcodes. April 2012. Available online: http://research.swtch.com/qart (accessed on 12 April 2012).
  22. Bach, F.R. Consistency of the Group Lasso and Multiple Kernel Learning. J. Mach. Learn. Res. 2007, 9, 1179–1225. [Google Scholar]
  23. Li, C.; Zhang, T.Q.; Liu, Y. Blind recognition of RS codes based on Galois Field Columns Gaussian Elimination. Telecommun. Eng. 2014, 54, 926–931. [Google Scholar]
  24. Cox, R. Finite Field Arithmetic and Reed-Solomon Coding. Apr. 2012. Available online: http://research.swtch.com/field (accessed on 10 April 2012).
  25. Otsu, N. A threshold selection method from gray-level histograms. IEEE Trans. Syst. Man Cybern. 1979, 9, 62–66. [Google Scholar] [CrossRef]
  26. Information Technology—Automatic Identification and Data Capture Techniques—QR Code 2005 Bar Code Symbology Specification; ISO/IEC 18004; ISO: Geneva, Switzerland, 2006.
Figure 1. Aesthetic QR code examples on paper [4].
Figure 1. Aesthetic QR code examples on paper [4].
Symmetry 10 00543 g001
Figure 2. The distribution of the RS code in the QR code.
Figure 2. The distribution of the RS code in the QR code.
Symmetry 10 00543 g002
Figure 3. Flowchart of the aesthetic QR code algorithm.
Figure 3. Flowchart of the aesthetic QR code algorithm.
Symmetry 10 00543 g003
Figure 4. (a) Gray histogram of background image; (b) Gray histogram by preprocessed image.
Figure 4. (a) Gray histogram of background image; (b) Gray histogram by preprocessed image.
Symmetry 10 00543 g004
Figure 5. (a) Positive basis vector matrix (PBVM); (b) Reverse basis vector matrix (RBVM).
Figure 5. (a) Positive basis vector matrix (PBVM); (b) Reverse basis vector matrix (RBVM).
Symmetry 10 00543 g005
Figure 6. (a) XOR operation process with PBVM; (b) XOR operation process with RBVM.
Figure 6. (a) XOR operation process with PBVM; (b) XOR operation process with RBVM.
Symmetry 10 00543 g006
Figure 7. (a) Result by using PBVM; (b) Result by using RBVM.
Figure 7. (a) Result by using PBVM; (b) Result by using RBVM.
Symmetry 10 00543 g007
Figure 8. The replacement flowchart of the QR code module.
Figure 8. The replacement flowchart of the QR code module.
Symmetry 10 00543 g008
Figure 9. (a) Aesthetic QR code. (b) Aesthetic QR code with our evaluation mechanism.
Figure 9. (a) Aesthetic QR code. (b) Aesthetic QR code with our evaluation mechanism.
Symmetry 10 00543 g009
Figure 10. (a) Data area modification; (b) Parity area modification; (c) Mixed areas modification.
Figure 10. (a) Data area modification; (b) Parity area modification; (c) Mixed areas modification.
Symmetry 10 00543 g010
Figure 11. (a) Star of the aesthetic QR code; (b) Rhombus of the aesthetic QR code.
Figure 11. (a) Star of the aesthetic QR code; (b) Rhombus of the aesthetic QR code.
Symmetry 10 00543 g011
Figure 12. (a) Original aesthetic QR code; (b) Modified aesthetic QR code after using error-correction capacity.
Figure 12. (a) Original aesthetic QR code; (b) Modified aesthetic QR code after using error-correction capacity.
Symmetry 10 00543 g012
Figure 13. Result of subjective visual effect test.
Figure 13. Result of subjective visual effect test.
Symmetry 10 00543 g013
Figure 14. Decoding rates under different light condition and scanning angles. (a) Decoding rates under different light conditions. (b) Decoding rates under different scanning angles.
Figure 14. Decoding rates under different light condition and scanning angles. (a) Decoding rates under different light conditions. (b) Decoding rates under different scanning angles.
Symmetry 10 00543 g014
Table 1. Aesthetic QR codes of the related algorithm.
Table 1. Aesthetic QR codes of the related algorithm.
Symmetry 10 00543 i001 Symmetry 10 00543 i002 Symmetry 10 00543 i003 Symmetry 10 00543 i004
Effect picture of Wakahara et al. [5]Effect picture of Ono et al. [7]Effect picture of Baharav et al. [8]Effect picture of Fujita et al. [9]
Symmetry 10 00543 i005 Symmetry 10 00543 i006 Symmetry 10 00543 i007 Symmetry 10 00543 i008
Effect picture of Lin et al. [10]Effect picture of Chu et al. [11]Effect picture of Fang et al. [12]Effect picture of V et al. [13]
Symmetry 10 00543 i009 Symmetry 10 00543 i010 Symmetry 10 00543 i011 Symmetry 10 00543 i012
Effect picture of E et al. [14]Effect picture of Kuribayashi et al. [15]Effect picture of Lin et al. [19]Effect picture of Li et al. [20]
Table 2. Comparison of our algorithm of aesthetic QR code and the algorithm in Lin et al. [19].
Table 2. Comparison of our algorithm of aesthetic QR code and the algorithm in Lin et al. [19].
[16] Symmetry 10 00543 i013 Symmetry 10 00543 i014 Symmetry 10 00543 i015
Ours Symmetry 10 00543 i016 Symmetry 10 00543 i017 Symmetry 10 00543 i018
Table 3. The error-correction rate of our method.
Table 3. The error-correction rate of our method.
ImagesAverage Error BytesError-Correction Rate (Average Error Bytes/Total Length of Code Words)
Human image data set (400)2.21.6%
Scene image data set (400)4.13.1%
Cartoon image data set (400)1.41.0%
Average2.61.9%
Table 4. Aesthetic QR code generated by different algorithms.
Table 4. Aesthetic QR code generated by different algorithms.
[11][21][26]Ours
Symmetry 10 00543 i019 Symmetry 10 00543 i020 Symmetry 10 00543 i021 Symmetry 10 00543 i022
Symmetry 10 00543 i023 Symmetry 10 00543 i024 Symmetry 10 00543 i025 Symmetry 10 00543 i026
Symmetry 10 00543 i027 Symmetry 10 00543 i028 Symmetry 10 00543 i029 Symmetry 10 00543 i030
Symmetry 10 00543 i031 Symmetry 10 00543 i032 Symmetry 10 00543 i033 Symmetry 10 00543 i034
Symmetry 10 00543 i035 Symmetry 10 00543 i036 Symmetry 10 00543 i037 Symmetry 10 00543 i038
Symmetry 10 00543 i039 Symmetry 10 00543 i040 Symmetry 10 00543 i041 Symmetry 10 00543 i042
Symmetry 10 00543 i043 Symmetry 10 00543 i044 Symmetry 10 00543 i045 Symmetry 10 00543 i046
Table 5. Dissimilarity between our aesthetic QR code and the background image by different algorithms.
Table 5. Dissimilarity between our aesthetic QR code and the background image by different algorithms.
ImagesHuang et al. [11]Cox et al. [21][26]Ours
Image 163.20147.3267.4536.76
Image 264.55171.3267.2625.34
Image 361.19127.9477.8043.28
Image 462.85177.8068.9121.36
Image 562.78214.1273.0924.23
Image 663.63203.5463.6435.45
Image 770.89160.9965.4840.31
Average64.16171.8569.0932.39
Table 6. Aesthetic QR code generated by our algorithm.
Table 6. Aesthetic QR code generated by our algorithm.
Input ImagesResultsInput ImagesResults
Symmetry 10 00543 i047 Symmetry 10 00543 i048 Symmetry 10 00543 i049 Symmetry 10 00543 i050
Symmetry 10 00543 i051 Symmetry 10 00543 i052 Symmetry 10 00543 i053 Symmetry 10 00543 i054
Symmetry 10 00543 i055 Symmetry 10 00543 i056 Symmetry 10 00543 i057 Symmetry 10 00543 i058
Symmetry 10 00543 i059 Symmetry 10 00543 i060 Symmetry 10 00543 i061 Symmetry 10 00543 i062
Table 7. Decoding rates on different mobile devices.
Table 7. Decoding rates on different mobile devices.
Mobile PhoneAPPDecoding Rates of 100 Images
HUAWEI Honor 7Wo Cha Cha98%
WeChat96%
QRcode Scanner100%
MI 5Wo Cha Cha98%
WeChat97%
QRcode Scanner99%
iPhone 6Wo Cha Cha100%
WeChat99%
QRcode Scanner100%
i-nigma100%

Share and Cite

MDPI and ACS Style

Lu, J.; Cheng, W.; Zhang, S.; Li, L.; Yang, Z.; Chang, C.-C. A Novel Aesthetic QR Code Algorithm Based on Hybrid Basis Vector Matrices. Symmetry 2018, 10, 543. https://doi.org/10.3390/sym10110543

AMA Style

Lu J, Cheng W, Zhang S, Li L, Yang Z, Chang C-C. A Novel Aesthetic QR Code Algorithm Based on Hybrid Basis Vector Matrices. Symmetry. 2018; 10(11):543. https://doi.org/10.3390/sym10110543

Chicago/Turabian Style

Lu, Jianfeng, Weiling Cheng, Shanqing Zhang, Li Li, Zaorang Yang, and Chin-Chen Chang. 2018. "A Novel Aesthetic QR Code Algorithm Based on Hybrid Basis Vector Matrices" Symmetry 10, no. 11: 543. https://doi.org/10.3390/sym10110543

APA Style

Lu, J., Cheng, W., Zhang, S., Li, L., Yang, Z., & Chang, C. -C. (2018). A Novel Aesthetic QR Code Algorithm Based on Hybrid Basis Vector Matrices. Symmetry, 10(11), 543. https://doi.org/10.3390/sym10110543

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop