Next Article in Journal
The Validity and Reliability of a Real-Time Biofeedback System for Lumbopelvic Control Training in Baseball Players
Previous Article in Journal
Enhancing the Responsiveness of Thermoelectric Gas Sensors with Boron-Doped and Thermally Annealed SiGe Thin Films via Low-Pressure Chemical Vapor Deposition
Previous Article in Special Issue
A Connector for Integrating NGSI-LD Data into Open Data Portals
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Dual-Message QR Codes

Department of Computer Science & Engineering, Yuan Ze University, 135 Far-East Rd., Chung-Li, Taoyuan 320, Taiwan
*
Author to whom correspondence should be addressed.
Sensors 2024, 24(10), 3055; https://doi.org/10.3390/s24103055
Submission received: 12 April 2024 / Revised: 6 May 2024 / Accepted: 10 May 2024 / Published: 11 May 2024
(This article belongs to the Special Issue Data Engineering in the Internet of Things—Second Edition)

Abstract

:
A novel dual-message QR code is proposed for carrying two individual messages that can be read by standard QR code readers: one from a close range and the other from a large distance. By exploring the module value determining the rule of typical QR code readers, we designed two-state module blocks that can be recognized as different module values through changing the distance from which the QR code is scanned, and applied them to construct the proposed dual-message QR code. Experiments were conducted to test the readability of the two messages within a dual-message QR code, with the results demonstrating the high feasibility of the proposed method. The dual-message QR code can be applied for designing creative applications. For example, an interactive wedding card that can access the growing film of the groom and that of the bride interchangeably, which bring the viewers a higher-quality experience.

1. Introduction

The quick response code (QR code) [1,2] is the most popular and widely used 2D barcode in the world. It is a kind of contactless data acquisition method with several favorable properties, including high-capacity data storage, high tolerance against partial corruption, readability from any orientation, and rapid decoding. A QR code provides a publicly available and user-friendly interface for facilitating automatic identification and data capture, and can be applied to identify, locate, and track items in diverse fields such as manufacturing, transportation, healthcare, office automation, retail, and advertising.
Most contemporary smartphones can read QR codes using their built-in cameras combined with publicly available QR applications (apps) downloaded from the Internet. In a typical QR code app, the camera app of the phone is launched to capture an image encompassing a QR code, the region of the QR code is then identified and extracted, and the message in the QR code is decoded. A predefined action is usually performed according to the decoded message, such as a URL message launching a browser on the phone to access a target website, or an SMS (Short Message Service) message being sent to the phone. This functionality provides a rapid method for accessing the target app without cumbersome typing, and is an effective and popular interface for commercial advertising and publicity strategies.
In order for QR code apps to exhibit robustness, some research [3,4,5] has applied image processing algorithms to increase the decoding rate of QR code images with non-uniform backgrounds or viewed in variable lighting conditions. A standard QR code consists of a square grid of black and white square blocks that reveals no useful information to human eyes. Some QR code generation methods [6,7,8,9,10,11,12] were proposed for constructing QR codes with visually meaningful patterns in order to provide discriminative information to human beings.
A standard QR code encodes a canonical public text string that can be read by standard QR code apps. To deliver sensitive data to intended users via QR codes, some methods for hiding data [13,14,15,16,17] have been proposed for concealing additional private data in QR codes. Some other methods [18,19,20] have been reported for increasing the amount of data in a QR code. However, specific QR code readers with dedicated decoding algorithms are required to access the additional data included by applying these methods.
In 2019, Yuan et al. [21] proposed a two-layer QR code that encodes two messages in a fabricated QR code comprising an upper translucent layer and a lower opaque layer. The two messages can be accessed by taking two photographs of the QR code: one from the left and the other from the right. However, a physical fabrication process is required to construct a two-layer QR code, which increases the cost and time. We have previously proposed the nested QR code [22] that comprises outer and inner QR codes, with these two codes being read separately by slightly adjusting the distance and/or angle when capturing images. In this method, the inner QR code is constrained to a small region of the outer QR code, and this approach has the disadvantage of decreasing the robustness of the decoding process against partial corruption.
Encoding two individual messages on a single QR code provides a friendly interface for delivering two individual but closely related messages. For example, given a QR code that encodes two URLs, one links to the growing film of the groom and another links to that of the bride. By changing the distance to scan, the QR code on the wedding card can access the growing film of the groom and that of the bride interchangeably, which will create a quality experience for the guests attending the wedding party. Given another example, a company can design a QR code that encodes two URLs, providing two types of media related to the company: one links to the website of the company, and the other links to an introductory video of the company on YouTube.
This paper presents a new method for integrating two individual QR codes within a square region. The two QR codes can be read by standard QR code readers: one from a close range and the other from a large distance. The two QR codes are the same size and can be displayed or printed without requiring a specific fabrication process. This approach provides an economical and robust way to develop practical applications that deliver two messages via a single QR code that can easily be read using popular QR code apps in the marketplace.
The remainder of this paper is organized as follows: Section 2 introduces the main features and decoding process of standard QR codes, Section 3 describes the proposed method, Section 4 presents experimental results, and conclusions are drawn in Section 5.

2. QR Code Features and Decoding Process

A standard QR code stores a string of text that can be read by any typical QR code scanning program. In this section, the features of a standard QR code are first described, and then the decoding process of a typical QR code scanner is introduced. These introductions provide readers with the background knowledge that makes the subsequent research methods easier to grasp.

2.1. QR Code Features

A QR code is a square image comprising a grid of black (or dark) and white (or light) square blocks called modules. Each module represents 1 bit of data, with a white module representing a 0 and a black module representing a 1. There are 40 versions of QR codes, and a QR code of version v (ranging from 1 to 40) has (17 + 4v) × (17 + 4v) modules. Four standardized encoding modes (numeric, alphanumeric, byte, and kanji) are specified in the QR code standard for encoding text consisting of different character sets. The text is encoded using Reed–Solomon codes to provide an error-correction capability. Four error-correction levels (L, M, Q, and H) are specified, which have error-correction capabilities of about 7%, 15%, 25%, and 30%, respectively [1].
Figure 1 shows the structure of a standard QR code of version 7. The modules of a QR code can be classified into function patterns and the data region. Function patterns include finder patterns, alignment patterns, timing patterns, separators, a dark module, and the quiet zone, which are designed to help identify and locate a QR code and to perform module alignment. The data region contains the actual data and the error-correction code words encoded in the QR code.

2.2. QR Code Decoding Process

The typical QR code decoding process is illustrated in Figure 2, which consists of the following four steps: (1) image thresholding, (2) QR code detection, (3) module bit extraction, and (4) error correction.
The QR code standard defines black and white modules, but it does not specify the image thresholding criterion for determining whether a specific module block is a black module or a white module. According to previous reports [4,10], local thresholding methods are more robust against illumination variations than global thresholding methods, and so they are often adopted for thresholding the captured image in QR code apps.
The finder patterns located at the three corners of a QR code are key structures for detecting the presence of the code. After the finder patterns have been detected, the estate of the QR code is located and normalized into a standard square by applying a perspective transformation to correct the distortion introduced by capturing images from different angles and distances. A module bit extraction process is performed to determine the module values of all module blocks. The extracted module values in the data region constitute the input-data and error-correction code words of the QR code.
The data extracted from module blocks might contain errors due to the image being distorted or performing inappropriate thresholding, and so Reed–Solomon error correction is applied until a valid text string is obtained.

3. Proposed Method

The QR code standard defines a module to be a square image representing bit data. Typically, a black module represents a bit value of 1 and a white module represents a bit value of 0. However, the criterion for determining a square image as a black module or a white module is not specified in the QR code standard. A model to characterize the rule for determining the module value for general QR code readers is next established below.
Given a module block B, the module value of B can be determined by evaluating the average luminance of a centroid region Ω of B:
m o d u l e _ v a l u e ( B ) = 0 i f λ Ω ( B ) t , 1 i f λ Ω ( B ) < t ,
where t is the threshold and λ Ω ( B ) is the average luminance of pixels {pij} in centroid region Ω of B calculated as
λ Ω ( B ) = 1 n u m b e r o f p i x e l s i n Ω p i j Ω λ ( p i j ) .
Most aesthetic QR codes [8,9,10,11,12] in the literature were designed on the basis that the module value is determined by a one-third centroid region (i.e., Ω = 1/3) of a module block. Experimental results demonstrated that the generated QR codes performed well both in terms of the quality of the visual elements and decoding robustness of the QR codes. However, we observe that most functional QR code readers do not evaluate the module value based on the average luminance of all pixels in a one-third centroid region of a module block.
To explore the module value determination rule adopted in functional QR code readers in smartphones, a special QR code was created by drawing all modules in the data region in such a way that only those pixels within a small centroid region were set to the module color, and other pixels were set to the inverse module color (white changed to black, and black changed to white), as shown in Figure 3.
Figure 3a shows a test QR code encoding the text “QR Code” that was generated using a module size of 29 × 29 pixels and a centroid size of 3 × 3 pixels. The structure of a module block is shown in Figure 3b, where the one-third centroid region of a module is marked using a dotted square. It can easily be calculated that the centroid region of a module occupies only about 10% of the one-third centroid region of a module block. If the module value is evaluated using the average luminance of all pixels in the one-third centroid region of a module, all of the module values in the data region will be invalid, and the message cannot be decoded correctly using QR code readers. To test this, this page of the paper was (1) displayed on a computer screen and (2) printed on an A4 sheet of paper, and we scanned the QR code using various QR code readers, including the iPhone X and iPhone 13 camera and the top-five most downloaded QR Code apps in both the Apple Store and Android Market. Experiments showed that all of the tested QR code readers could decode the “QR Code” message correctly, although sometimes several trials moving the camera around the QR code were needed.
A model of the module value determination rule was established based on the ZXing [23] barcode scanning library, which contains QR code encoding/decoding functions and is widely used in both academic research and commercial applications. We examined the source code of the QR code decoding program in that library, and observed that only the centroid pixel of a module block in the captured image is utilized to determine the module value. Based on the image projection principle, the centroid pixel of a module block in the captured image is projected from a region of pixels of the corresponding module block onto the exhibited QR code, as illustrated in Figure 4. This figure shows that the pixels projected onto the centroid pixel of a module block vary with the scanning distance: if the QR code is scanned from close range, as shown in Figure 4b, a small region of pixels is projected onto the centroid pixel, whereas if the QR code is scanned from a large distance, a larger region of pixels is projected onto the centroid pixel.
The following QR code module value determination rule is established based on the previous observation:
Property 1. 
The centroid region of pixels of a module block in the exhibited QR code is applied to evaluate the module value. However, the region is not constant: pixels within a small centroid region are used in determining the module value if the QR code is scanned from close range, while pixels in a large centroid region are utilized in determining the module value if the QR code is scanned from a large distance.
The lack of a standard specification for the module value evaluation criteria in the QR code decoding process means that different QR code apps may apply different extraction methods. Moreover, the decoding algorithms used in most commercial apps are not publicly disclosed. In practical implementations of QR code readers such as the ZXing [23] barcode scanning library, the centroid pixel of each QR code module block in the captured image is used to determine the module value, which provides rapid decoding and good robustness. Based on the perspective property inherent in image projection previously discussed above, an object that is further from the camera will tend to appear smaller in the image plane. In other words, a pixel in the image plane is projected from a small region of the scene at a close range, and from a larger region of the scene at a distance. In short, if the QR code is scanned from a close range, a small region of pixels within the exhibited module block is sampled to determine the module value; however, if the QR code is scanned from a large distance, a larger region of pixels within the exhibited module block is sampled to determine the module value.
The properties of the method used to determine the module value as discussed above enable the design of a module block that can be recognized as different module values by QR code readers. This is referred to as a two-state module block, as defined in the following:
Definition 1. 
A near–far, two-state module block is a module block that can be decoded as a near = {0, 1} module by QR code readers when the QR code is scanned from a close range, and can be decoded as a far = {0, 1} module by QR code readers when the QR code is scanned from a large distance.
The fundamental idea underlying the dual-message QR code is to set the color of a small centroid region ω × ω of a module block to the module value to be decoded at a close range, and the color of the other outer region of the module block to the module value to be decoded at a distance. Table 1 summarizes the structure of four types of two-state module blocks according to the combination of module values to be decoded at a close range and at a distance; for example, in a 0-1 two-state module block, the small centroid region is set to white and the outer region is set to black.
Figure 5 illustrates the working model of the designed two-state module block. Figure 5a is a 1-0 two-state module block. The region of pixels in the exhibited module block to be projected onto the centroid pixel of the module block in the image plane from a close range and from a large distance are marked by the red square in Figure 5b and Figure 5c, respectively. It can easily be evaluated that the average luminance within the red centroid region in Figure 5b is lower than the threshold, while that in Figure 5c is higher than the threshold. Therefore, the module block will be recognized as a 0 module from a close range and as a 1 module from a large distance.
Based on the two-state module blocks, the proposed dual-message QR code is summarized next:
Dual-Message, QR-Code-Generating Algorithm
Input:
   
MSGnear: text string to be read from a close range.
   
MSGfar: text string to be read from a large distance.
m: side length of a module block specified by the user; the size of a module block is m × m pixels.
   
ω: side length of the centroid region specified by the user; the size of the centroid region is ω × ω pixels.
Output:
   
QRdual: the dual-message QR code.
Steps:
   
Step 1. Encode MSGnear in the binary representation of QR code QRnear, and encode MSGfar in the binary representation of QR code MSGfar. QRnear and QRfar are standard QR codes with the same version and error-correction level.
   
Step 2. Fetch a not-processed-yet module bit p in the scanning order from QRnear and corresponding module bit q from QRfar, and draw the module on QRdual using a p-q two-state module block.
   
Step 3. Repeat Step 2 until all modules in QRnear and QRfar are processed.
   
Step 4. Add a quiet zone border with a width of 4m to QRdual.
End.

4. Experimental Results

Figure 6 shows an example of dual-message QR code encoding two separate messages using the proposed method. The QR code in Figure 6a is a typical QR code with message MSGnear = “Near view is less,” and The QR code in Figure 6b is a typical QR code with message MSGfar = “Far view is more.” The two QR codes are both version-1 standard QR codes with error-correction level set to L. The QR code in Figure 6c is the dual-message QR code that encodes both messages MSGnear and MSGfar. Parameters m and ω applied to generate the dual-message QR code are set to 29 and 7, respectively.
The dual-message QR code was (1) displayed on the screen of an ASUS VX239H Monitor with resolution 1920 × 1080 pixels, and (2) printed out on an A4 paper so that the QR code had a size of 4.0 × 4.0 cm2. Figure 7 shows four snapshots of the QR code detected in the build-in camera of an iPhone X smartphone. Figure 7a is the snapshot to QRdual displayed on the screen captured from a close range about 30 cm to the screen, on which we can see the message MSGnear = “Near view is less” was read by the QR code reader on the built-in camera. Figure 7b is the snapshot to QRdual displayed on the screen captured at a distance about 50 cm apart from the screen, on which the message MSGfar = “Far view is more” was decoded. Figure 7c is the snapshot to QRdual displayed on paper captured from a close range about 20 cm to the paper, on which the message “Near view is less” was read. Figure 7d is the snapshot to QRdual displayed on paper captured at a distance about 40 cm apart from the paper, on which the message “Far view is more” was decoded. We also tested the reading of message from QRdual using iPhone 13 built-in camera and popular QR code readers downloaded from Android Market installed on a Samsung A53 Android smartphone, and the results show MSGnear and MSGfar can easily be read separately from a close range and at a large distance using all of QR code scanners. The readers can do this test using any standard QR code reader in his/her smartphone. Note that the built-in camera of Samsung A53 Android smartphone does not work well in decoding MSGnear due to its specific QR code decoding algorithm. In our test, it consistently tends to read MSGfar instead.
To select an appropriate ω that allows both MSGnear and MSGfar to be easily decoded by standard QR code readers, two-state module blocks with centroid regions of different sizes were applied to construct the dual-message QR code in Figure 8. The readability of MSGnear and MSGfar was tested using four popular QR code readers: (1) the build-in camera of an iPhone X, (2) the Barcode Scanner app on a Samsung A53 Android smartphone, and the QR Scanner app on both (3) an iPhone X and (4) a Samsung A53 Android smartphone. In this experiment, the QR codes were printed on paper so that they each had a size of 6.0 cm × 6.0 cm. Six users were asked to scan MSGnear and MSGfar from the dual-message QR code using the four QR code readers, and a message was defined as decodable by the QR code reader if all of the users were able to successful read it using the QR code reader within 8 s, and undecodable otherwise.
Figure 9 is another example of dual-message QR code encoding MSGnear = “https://youtu.be/MUcTeoFJ9qo” and MSGfar = “https://youtu.be/zNmhCabrJlg.” The two messages are two URLs linking to the growing up films of a new couple: one for the bride and another for the groom. Both of them are encoded using version-3 QR code with an error-correction level of L. Parameters m and ω applied to generate the dual-message QR code are set to 11 and 3, respectively.
Table 2 summarizes the results of this experiment. It can be seen that both MSGnear and MSGfar were decodable in the cases where the centroid region size was set to 5 × 5, 7 × 7, and 9 × 9 pixels. The QR code readers tended to decode MSGnear from the dual-message QR code if a larger ω was set, while they tended to decode MSGfar if a smaller ω was set. In our experience, a size of slightly smaller than one-third of the side length of a module block is the best choice of ω for constructing a dual-message QR code.
Table 3 compares the properties of the proposed dual-message QR code with QR code schemes carrying two levels of messages that can be accessed by standard QR code readers. A previously reported method [21] accesses the two messages by viewing from the left and from the right. The two QR codes are of the same size, but it is difficult to access the messages when they can only be viewed from narrow range of directions, and a physical fabrication process is required to generate the two-layer QR code. The nested QR code [22] can be generated with less effort by printing it out directly, and the two messages can be accessed by slightly adjusting the distance and angle to capture the corresponding QR code image. However, the inner QR code is constrained to a small region of the outer QR code. In contrast, the proposed dual-message QR code encodes two messages in equal-size QR codes, which can be read by simply changing the distance at which the image is captured: one from a close range and the other from a large distance. Moreover, generating a dual-message QR code is simple and rapid, and the two messages that it contains can be accessed with good robustness.

5. Conclusions

This paper presents a new method for encoding two individual messages in a single QR code, where the two messages can be read using standard QR code apps: one from a close range and the other from a large distance. Construction methods for the dual-message QR code are provided, and the code can be printed out or displayed without a fabrication process. The proposed dual-message QR code extends convention QR codes that deliver a single message to two tracks of messages, which has applications in many creative fields.

Author Contributions

K.-C.C.: conceptualization, methodology, software, writing—original draft. R.-Z.W.: methodology, formal analysis, validation, writing—review and editing. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by MOST Taiwan, grant number 110-2221-E-155-050-.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. ISO/IEC 18004:2015; Information Technology—Automatic Identification and Data Capture Techniques—QR Code Bar Code Symbology Specification. ISO/IEC: Genève, Switzerland, 2015.
  2. Tiwari, S. An introduction to QR code technology. In Proceedings of the 2016 International Conference on Information Technology (ICIT), Bhubaneswar, India, 22–24 December 2016; pp. 39–44. [Google Scholar]
  3. Belussi, L.F.F.; Hirata, N.S.T. Fast QR code detection in arbitrarily acquired images. In Proceedings of the 2011 24th SIBGRAPI Conference on Graphics, Patterns and Images, Alagoas, Brazil, 28–31 August 2011; pp. 281–288. [Google Scholar]
  4. Lin, J.A.; Fuh, C.S. 2D barcode image decoding. Math. Prob. Eng. 2013, 2013, 848276. [Google Scholar] [CrossRef]
  5. Yang, Z.; Xu, H.; Deng, J.; Loy, C.C.; Lau, W.C. Robust and fast decoding of high-capacity color QR codes for mobile applications. IEEE Trans. Image Process. 2018, 27, 6093–6108. [Google Scholar] [CrossRef] [PubMed]
  6. Samretwit, D.; Wakahara, T. Measurement of reading characteristics of multiplexed image in QR code. In Proceedings of the 2011 Third International Conference on Intelligent Networking and Collaborative Systems, Fukuoka, Japan, 30 November–2 December 2011; pp. 552–557. [Google Scholar]
  7. Lin, Y.S.; Luo, S.J.; Chen, B.Y. Artistic QR code embellishment. Comput. Graph. Forum 2013, 32, 137–146. [Google Scholar] [CrossRef]
  8. 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]
  9. 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] [CrossRef]
  10. Xu, M.; Su, H.; Li, Y.; Li, X.; Liao, J.; Niu, J.; Lv, P.; Zhou, B. Stylize aesthetic QR code. IEEE Trans. Multimed. 2019, 14, 1960–1970. [Google Scholar] [CrossRef]
  11. Hung, S.H.; Yao, C.Y.; Fang, Y.J.; Tan, P.; Lee, R.R.; Sheffer, A.; Chu, H.K. Micrography QR codes. IEEE Trans. Visual. Comput. Graph 2020, 26, 2834–2847. [Google Scholar] [CrossRef] [PubMed]
  12. Garateguy, G.J.; Arce, G.R.; Lau, D.L.; Villarreal, O.P. QR images: Optimized image embedding in QR codes. IEEE Trans. Imag. Process. 2014, 23, 2842–2853. [Google Scholar] [CrossRef] [PubMed]
  13. Chiang, Y.J.; Lin, P.Y.; Wang, R.Z.; Chen, Y.H. Blind steganographic approach for QR code module based upon error correction capability. KSII Trans. Internet Inf. Syst. 2013, 7, 2527–2543. [Google Scholar]
  14. Bui, T.V.; Vu, N.K.; Nguyen, T.T.P.; Echizen, I.; Nguyen, D. Robust message hiding for QR code. In Proceedings of the 2014 Tenth International Conference on Intelligent Information Hiding and Multimedia Signal Processing, Kitakyushu, Japan, 27–29 August 2014; pp. 520–523. [Google Scholar]
  15. Lin, P.Y.; Chen, Y.H. High payload secret hiding technology for QR codes. EURASIP J. Image Video Process 2017, 2017, 14. [Google Scholar] [CrossRef]
  16. Huang, P.C.; Li, Y.H.; Chang, C.C.; Liu, Y. Efficient scheme for secret hiding in QR code by improving exploiting modification direction. KSII Trans. Internet Inf. Syst. 2018, 12, 2348–2365. [Google Scholar]
  17. Barron, I.; Yeh, H.J.; Dinesh, K.; Sharma, G. Dual modulated QR codes for proximal privacy and security. IEEE Trans. Image Process. 2021, 30, 657–669. [Google Scholar] [CrossRef] [PubMed]
  18. Vongpradhip, S. Use multiplexing to increase information in QR code. In Proceedings of the 2013 8th International Conference on Computer Science & Education, Colombo, Sri Lanka, 26–28 April 2013; pp. 361–364. [Google Scholar]
  19. Tkachenko, I.; Puech, W.; Destruel, C.; Strauss, O.; Gaudin, J.M.; Guichard, C. Two-level QR code for private message sharing and document authentication. IEEE Trans. Inf. Forensics Secur. 2016, 11, 571–583. [Google Scholar] [CrossRef]
  20. Liu, S.; Fu, Z.; Yu, A.B. Rich QR codes with three-layer information using hamming code. IEEE Access 2019, 7, 78640–78651. [Google Scholar] [CrossRef]
  21. Yuan, T.; Wang, Y.; Xu, K.; Martin, R.R. Two-layer QR codes. IEEE Trans. Image Process. 2019, 28, 4413–4428. [Google Scholar] [CrossRef] [PubMed]
  22. Chou, K.C.; Wang, R.Z. The nested QR code. IEEE Signal Process. Lett. 2020, 27, 1230–1234. [Google Scholar] [CrossRef]
  23. Owen, S. ZXing (“Zebra Crossing”) Barcode Scanning Library for Java, Android. Available online: https://opensource.google/projects/zxing (accessed on 24 March 2024).
Figure 1. Structure of a version-7 QR code. Function patterns are used to locate and identify the parameters of a QR code. Data modules contain the input-data code words and the error-correction code words.
Figure 1. Structure of a version-7 QR code. Function patterns are used to locate and identify the parameters of a QR code. Data modules contain the input-data code words and the error-correction code words.
Sensors 24 03055 g001
Figure 2. Typical QR code decoding procedure.
Figure 2. Typical QR code decoding procedure.
Sensors 24 03055 g002
Figure 3. Special QR code for exploring the module value determination rule. (a) The testing QR code. (b) Layout of a module block.
Figure 3. Special QR code for exploring the module value determination rule. (a) The testing QR code. (b) Layout of a module block.
Sensors 24 03055 g003
Figure 4. Illustration of pixels of an exhibited module block that are projected onto the centroid pixel of a module block in the captured image. (a) QR code module located at a distance. (b) QR code module located at close range. (c) A pixel in the camera image plane.
Figure 4. Illustration of pixels of an exhibited module block that are projected onto the centroid pixel of a module block in the captured image. (a) QR code module located at a distance. (b) QR code module located at close range. (c) A pixel in the camera image plane.
Sensors 24 03055 g004
Figure 5. Working model of the two-state module block. (a) The designed 1-0 two-state module block. (b) The region to be projected onto the centroid pixel of the module block from a close range. (c) The region to be projected on the centroid pixel of the module block from a large distance.
Figure 5. Working model of the two-state module block. (a) The designed 1-0 two-state module block. (b) The region to be projected onto the centroid pixel of the module block from a close range. (c) The region to be projected on the centroid pixel of the module block from a large distance.
Sensors 24 03055 g005
Figure 6. An example of dual-message QR code. (a) Standard QR code with message “Near view is less.” (b) Standard QR code with message “Far view is more.” (c) Dual-message QR code generated by setting the module block size and the centroid region size to 29 × 29 and 7 × 7 pixels, respectively.
Figure 6. An example of dual-message QR code. (a) Standard QR code with message “Near view is less.” (b) Standard QR code with message “Far view is more.” (c) Dual-message QR code generated by setting the module block size and the centroid region size to 29 × 29 and 7 × 7 pixels, respectively.
Sensors 24 03055 g006
Figure 7. Accessing MSGnear and MSGfar from the dual-message QR code. (a) Snapshot of QRdual displayed on the screen captured from a close range. (b) Snapshot of QRdual displayed on the screen captured at a distance. (c) Snapshot of QRdual displayed on paper captured from a close range. (d) Snapshot of QRdual displayed on paper captured at a distance.
Figure 7. Accessing MSGnear and MSGfar from the dual-message QR code. (a) Snapshot of QRdual displayed on the screen captured from a close range. (b) Snapshot of QRdual displayed on the screen captured at a distance. (c) Snapshot of QRdual displayed on paper captured from a close range. (d) Snapshot of QRdual displayed on paper captured at a distance.
Sensors 24 03055 g007
Figure 8. Dual-message QR codes generated with module block size of 29 × 29 and vary centroid region size from 1 to 11.
Figure 8. Dual-message QR codes generated with module block size of 29 × 29 and vary centroid region size from 1 to 11.
Sensors 24 03055 g008
Figure 9. Another example of dual-message QR code with two messages “https://youtu.be/MUcTeoFJ9qo” and “https://youtu.be/zNmhCabrJlg.” The module block size and the centroid region size are set to 11 × 11 and 3 × 3 pixels, respectively.
Figure 9. Another example of dual-message QR code with two messages “https://youtu.be/MUcTeoFJ9qo” and “https://youtu.be/zNmhCabrJlg.” The module block size and the centroid region size are set to 11 × 11 and 3 × 3 pixels, respectively.
Sensors 24 03055 g009
Table 1. Structure of near–far, two-state module blocks.
Table 1. Structure of near–far, two-state module blocks.
View DistanceValueValueValueValue
Near0011
Far0101
Module blockSensors 24 03055 i001
Table 2. Decoding to MSGnear or MSGfar from dual-message QR codes with different centroid sizes of a 29 × 29 module block.
Table 2. Decoding to MSGnear or MSGfar from dual-message QR codes with different centroid sizes of a 29 × 29 module block.
ω × ω1 × 15 × 5 3 × 37 × 7 9 × 9 11 × 11
iPhone camerax/xo/oo/oo/oo/oo/x
iPhone QR Scannerx/xo/oo/oo/oo/oo/o
Android Barcode Scannerx/xx/oo/oo/oo/oo/x
Android QR Scannerx/xx/oo/oo/oo/oo/x
o: decodable; x: undecodable.
Table 3. Comparison of QR code methods with two-layer data that can be accessed using standard QR code readers.
Table 3. Comparison of QR code methods with two-layer data that can be accessed using standard QR code readers.
Layer-1
Message
Layer-2
Message
Sizes of Two
QR Codes
Generation Cost of QR Codes
[21]Left view Right view EqualHigh
[22]InnerOuterDifferentLow
Ours Close range From a large distance EqualLow
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Chou, K.-C.; Wang, R.-Z. Dual-Message QR Codes. Sensors 2024, 24, 3055. https://doi.org/10.3390/s24103055

AMA Style

Chou K-C, Wang R-Z. Dual-Message QR Codes. Sensors. 2024; 24(10):3055. https://doi.org/10.3390/s24103055

Chicago/Turabian Style

Chou, Kuo-Chien, and Ran-Zan Wang. 2024. "Dual-Message QR Codes" Sensors 24, no. 10: 3055. https://doi.org/10.3390/s24103055

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