TWO-DIMENSIONAL BAR CODES THAT ARE BOTH INTENSITY-MODULATED AND ORIENTATION-MODULATED FOR TRANSMITTING SENSITIVE INFORMATION ALONG WITH NON-SENSITIVE INFORMATION
20220129654 · 2022-04-28
Inventors
Cpc classification
G06K19/06056
PHYSICS
G06K19/06112
PHYSICS
G06K19/0614
PHYSICS
International classification
Abstract
A dual-modulated QR code (DMQR code) is in the format of a conventional QR code but uses elongated markers instead of black squares in the code modules. The positions of the markers within the DMQR code represent a nonconfidential primary message, and the orientations of the markers within the modules of the DMQR code represent a confidential secondary message.
Claims
1. A two-dimensional bar code comprising a two-dimensional grid made up of blank and non-blank square modules in which non-blank modules contain elongated colored markers, each elongated colored marker having an area that is smaller than the module within which the elongated colored marker is located.
2. The code of claim 1, wherein the elongated colored marker is black and elliptical.
3. The code of claim 1, wherein the bar code has a QR code format.
4. A system for encoding primary message data and secondary message data into a two-dimensional bar code having a two-dimensional grid made up of square modules, comprising: a. identifying modules that will contain a marker will appear according to the primary data; and b. placing an elongated colored marker within each such identified module and orienting said elongated markers in accordance with the secondary data.
5. The system of claim 4 wherein the markers are black and elliptical.
6. The system of claim 5 wherein the markers have identical sizes.
7. The system of claim 4 wherein vertically and horizontally oriented markers have a first size and markers having inclined orientations have a larger size.
8. The system of claim 4 wherein the two-dimensional bar code has a QR code format.
9. A method of displaying a primary message and a secondary message on a video display using a two-dimensional bar code having square modules in a predefined format, comprising: a. identifying modules on the display for carrying the messages; b. encoding the primary message in marker-containing modules; c. encoding the secondary message by orienting elongated colored markers in said marker-containing modules in accordance with the secondary message; d. displaying the resulting two-dimensional bar code image on a video display.
10. The method of claim 9, wherein the encoding steps include error-correction encoding.
11. The method of claim 9 wherein the markers are black and elliptical.
12. The method of claim 9 wherein the predefined format is a QR code format.
13. A method of extracting a primary message and a secondary message from a video image of a two-dimensional bar code produced by the system of claim 4, comprising: a. deriving, from the image, the locations of the marker-containing modules; b. deriving, from the image, the orientations of the markers within those modules; c. decoding the primary message from said derived locations; and d. decoding the secondary message from said derived orientations.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The patent or application file contains at least one drawing executed in color. Copies of this patent or patent application publication with color drawing(s) will be provided by the Office upon request and payment of the necessary fee.
[0015] The invention will be better understood in correction with the exemplary and non-limiting drawings, in which:
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS
[0026] As a preliminary matter, the below-described preferred embodiment is a type of QR code. This is because of the ubiquity with which QR codes are used. However, persons skilled in the art know that a QR code is merely a specific type of two-dimensional bar code that is square in shape and has a predefined format. Other two-dimensional bar codes exist. For example, an Aztec code is a two-dimensional bar code commonly used for transportation applications such as airline tickets, a Datamatrix code is a two-dimensional bar code used for small items, goods, and documents, and a PDF417 code is a two-dimensional bar code used to store large quantities of data. A conventional two-dimensional bar code is made up of a multiplicity of square regions (“modules”), which may be left entirely blank or marked entirely black with a square black marker. While the herein-described preferred embodiment is a type of QR code, a person skilled in the art will understand that the invention can be implemented in any type of two-dimensional bar code, specifically including Aztec, Datamatrix, and PDF417 codes. A QR bar code format is not required to practice the invention.
[0027] The preferred embodiment described in the following detailed description is described as a dual-modulated QR code, or DMQR. This is because the preferred embodiment has the format of a QR code but is both intensity-modulated and orientation-modulated. Furthermore, the marker described below is consistently identified as a black dot in the shape of an ellipse. This is presently preferred, but is not required. Other colors can be used instead, provided that the coloration is sufficiently intense, and the marker shape need not be elliptical or a dot, but rather need only be elongated. Advantageously, the size of each dot can be determined by the orientation of the dot; dots that are oriented other than horizontally or vertically can have larger sizes than dots that are oriented horizontally and vertically. This improves decodability. Additionally, the herein-described application runs on a cellphone and the cellphone optically communicates with a laptop webcam. Although this is presently preferred, neither a cellphone nor a laptop webcam is necessary for the practice of the invention. Any electronic device with a video screen (e.g. a tablet computer or a video monitor) can be used to display a code in accordance with the invention and any electronic device with a video camera can be used to receive a code in accordance with the invention.
[0028]
[0029] DMQR codes in accordance with the invention use intensity and orientation modulation to embed primary and secondary data, respectively.
[0030] The top half of
[0031] The primary message embedding procedure for DMQR codes is analogous to and compatible with conventional QR code encoding. In particular, synchronization patterns, alignment patterns, and the geometry of data carrying modules are all identical to those in traditional QR codes. In .sub.i, for 1≤i≤N.sub.B, with N.sub.B representing number of modules containing black elliptical dots.
[0032] The procedure for embedding the secondary message involves modulating the orientation of the black elliptical dots resulting from the primary data modulation within their corresponding N.sub.B modules. First, the secondary message m.sub.s undergoes error correction encoding, which adds redundancy to allow for error recovery, and yields (encoded) secondary data c.sub.s. The secondary data c.sub.s is represented as a string of N.sub.B M-ary symbols c.sub.s,1, c.sub.s,2, . . . , c.sub.s,N.sub..sub.i is determined as,
[0033] Specifically, if Δ denotes the length of either side of the square modules and (χ.sub.0.sup.i, ζ.sub.0.sup.i) denote the coordinates of the center of the i.sup.th module .sub.i, the region satisfying the constraint
is rendered as the black elliptical dot within the extent of the module, which is defined by (χ.sub.0.sup.i−Δ/2)≤χ≤(χ.sub.0.sup.i+Δ/2) and (ζ.sub.0.sup.i−Δ/2)≤ζ≤(ζ.sub.0.sup.i+Δ/2). Note that the length of the major axis of the ellipse matches the width/height Δ of the modules and is oriented along the angle ϕ.sub.c.sub.
[0034] As an example,
[0035] As illustrated in
[0036] The embedded primary and secondary messages are decoded from the synchronized captured DMQR code image I(χ,ζ) using the procedure shown in the bottom half of
[0037] The primary message is decoded using a conventional QR code decoder. The reader performs intensity demodulation, i.e., estimates a (0/1) bit value for each data carrying module based on whether the module is blank or dark, i.e., whether the module contains a black elliptical dot. By XORing with the binary pattern used for the encoding, an estimate ĉ.sub.p of the encoded primary data is first obtained. An error correction decoder corresponding to the error correction code used at the encoder decodes the message ĉ.sub.p to recover an estimate of the primary message, {circumflex over (m)}.sub.p.
[0038] Additional secondary symbol synchronization is performed first by estimating which modules contained black elliptical dots, i.e. which modules were not blank. Specifically, using the decoded primary message {circumflex over (m)}.sub.p, the decoder can estimate the locations of the dot carrying modules by replicating the process used at the encoder for the primary message to identify the modules .sub.i, i=1, 2, . . . N.sub.B that (purportedly) carry the oriented black elliptical dots. Once secondary symbol synchronization is achieved, for simplicity of implementation, we use a version of the efficient heuristic orientation demodulation scheme proposed in Bulan, O., and Sharma, G. 2011. “High Capacity Color Barcodes: Per Channel Data Encoding via Orientation Modulation in Elliptical Dot Arrays.” IEEE Trans. Image Proc. 20 (5): 1337-50.
[0039] The I(χ,ζ) is binarized (at proximal distances, for which the secondary message can be reliably decoded, we observe very similar performance when decoding from either the binarized image or the captured grayscale image) to obtain (χ,ζ) and one-dimensional image moments are computed along the M orientation modulation angles. Specifically, for j=0, 1, . . . (M−1), the image moment along the orientation angle ϕ.sub.j=πj/M is computed as
corresponds to the abscissa for the coordinate system obtained by rotating the coordinates (χ,ζ) counter-clock-wise by the angle ϕ.sub.j, and
is the coordinate of the abscissa for the center of mass of the binarized image Ī(χ,ζ) in the rotated coordinate space. The angle ϕ.sub.j that maximizes μ.sub.j.sup.i determines an estimated symbol ĉ.sub.s,i, which can be mathematically expressed as
[0040]
[0041] Finally, an error correction decoder corresponding to the code used to encode the secondary message decodes the demodulated secondary data ĉ.sub.s to obtain an estimate {circumflex over (m)}.sub.s of the secondary message.
[0042] Apart from parameters inherited from the underlying QR code construction (e.g. module size, error correction level, etc.), DMQR codes have two additional parameters, M, the number of orientations used and ∈, which controls the eccentricity of the elliptical dots used. The number of orientations M impacts the reliability with which individual secondary modulated symbols can be detected, as is standard in most multi-level modulation schemes for digital communications. The eccentricity parameter ∈, which ranges between 0 and 1, impacts the modulation for both the primary and secondary data as illustrated in
[0043] Furthermore, the size of the dots can be varied with the orientations of the dots. The modulation for DMQR codes can be improved by using black oriented elliptical dots with different sizes for each modulation orientation such that each dot covers the maximum possible area of a square module without exceeding its boundaries. Specifically, as shown in
[0044] Consider the placement of an elliptical dot within its square module in the DMQR code. Specifically, let (χ,ζ) denote a 2D orthogonal coordinate system for the DMQR code and consider the region (χ.sub.0.sub.
χ(t)=a cos t cos ϕ.sub.i+b sin t sin ϕ.sub.i+χ.sub.0.sub.
ζ(t)=a cos t sin ϕ.sub.i−b sin t cos ϕ.sub.i+ζ.sub.0.sub.
[0045] The parameter ∈=a/b determines the eccentricity of the elliptical dots and the orientation ϕ.sub.i=πc.sub.s,i/M is defined by the i.sup.th M-ary valued secondary data symbol c.sub.s,i (from the M possible orientations 0, n/M, . . . (M−1)π/M). To avoid inter-module interference, the length a of the semi-major axis should be chosen so as to ensure that the elliptical dot is contained fully within its module. The horizontal and vertical modulation orientations pose the most stringent constraints on a, and based on these, one could use a fixed value of a=Δ/2. While this constraint ensures that the elliptical dots are contained fully within the modules, the dots for orientations other than horizontal and vertical do not extend to the module boundaries and the modulation is therefore sub-optimal for both the primary data, where larger dots would make the modules darker and better distinguished from the white modules, and for the secondary data, where the different orientations are also better distinguished. To optimize the modulation, we therefore also choose a based on the modulation angle ϕ.sub.i. Specifically, it can be readily seen that, subject to the aforementioned constraint, the largest possible length of the semi-major axis for the j.sup.th modulation orientation angle πj/M, for j=0,1, . . . (M−1), is
where θ.sub.j=π/2 for M/4<j<3M/4 and θ.sub.j=0 otherwise.
[0046]
[0047] DMQR codes were created using the encoding process described above with the primary message m.sub.p as a URL and the secondary message as a secure password obtained from a strong password generator website (https://passwordsgenerator.net/). Values M=2, 4, 8 were used for embedding the secondary data. Error correction encoding of the primary and secondary messages was performed using, respectively, the level M error correction ISO/IEC. 2006. “Information Technology—Automatic Identification and Data Capture Techniques—QR Code 2005 Bar Code Symbology Specification.” http://www.iso.org/iso/iso_catalogue/catalogue_ics/catalogue_detail_ics.htm?csnumber=43655 (a Reed-Solomon code capable of correcting approx. 15% errors) for conventional QR codes and a rate 1/2 convolutional code Wilson, S. G. 1996. Digital Modulation and Coding. Upper Saddle River, N.J., USA: Prentice Hall. We note that to maintain compatibility with conventional QR code decoders, the error correction code for the primary data also needs to be compatible with the QR code standard ISO/IEC. 2006. “Information Technology—Automatic Identification and Data Capture Techniques—QR Code 2005 Bar Code Symbology Specification.” http://www.iso.org/iso/iso_catalogue/catalogue_ics/catalogue_detail_ics.htm?csnumber=43655, however, error correction for secondary data is not similarly constrained and can be chosen independently from among the many available options. (Another choice for error correction for secondary data is discussed below.) Convolutional codes were chosen in this implementation because they are readily available and the lack of a block-length constraint makes it easy to handle the variable length of the secondary data without having to switch codes. To facilitate synchronization, a uniform blank border 15% of the size S of the DMQR code along each dimension was added. For accomplishing localization and synchronization, and for decoding the primary data, we used ZXing “ZXing C++ Port.” https://github.com/glassechidna/zxing-cpp, an open source QR code decoder, that handles the intensity demodulation and error correction decoding of ĉ.sub.p. Additional implementation details can be found in Appendix A.
[0048] It will be noted that error correction need not be (and advantageously should not be) carried out using convolutional codes such as those just described. Modern 5G cellphones utilize channel models and soft decision encoding, and utilizing this alternate error correction technique will improve results when using 5G cellphones without degrading results when using previous generations of cellphones.
[0049] For soft-decision decoding, instead of estimating the demodulated secondary data ĉ.sub.s and then using in a binary input convolutional decoder, bit-wise log-likelihood ratios (LLRs) Λ can be obtained from the orientation demodulation that can be used in more powerful soft-decision decoders. We develop a statistical channel model for the moment based demodulator used for our secondary data, which enables use of state of the art error correction with soft-decision decoding. We express the statistical model for the channel as a conditional probability density function ƒ.sub.r(r|ϕ.sub.j), where r is a vector constituted by M image moments obtained from the moment based demodulator whose values depend on the rotation angle ϕ.sub.j. The conditional density function ƒ.sub.r(r|ϕ.sub.j) can be represented in parametric form where the parameters are estimated at the decoder. For instance, deviations from the conditional means given the rotation angle rotation angle ϕ.sub.j can be modeled as Gaussian or Laplacian distributions.
[0050] To increase secondary message decoding performance, soft-decoding is enabled by exploiting the proposed channel model. Specifically, considering gray coded constellations for the orientation modulation, the channel knowledge is provided as a soft measure for the error correction decoder by using bit-wise log-likelihood ratios (LLRs) Λ, specifically
where b is a vector of bits that represents a gray coded M-ary symbol, and b.sub.l is the l.sup.th bit of b, for l=0, 1, . . . (log.sub.2(M)−1). Note that the last expression was obtained by considering Bayes' theorem and equiprobable symbols. Furthermore, the notation ϕ.sub.b is used instead of ϕ.sub.j to show how the bit-wise LLRs Λ are computed, and indicate the use of gray coding, which can be handled by the DMQR code decoder without problem.
[0051] The decoders for Polar or LDPC codes from the 5G NR standard work with LLRs and the preceding computation of LLRs therefore allows us to encode the secondary message of a DMQR code using these codes (as well as alternative error correction codes that require LLRs for soft decoding).
[0052] To characterize performance, for both primary and secondary data we used two evaluation metrics: bit error rate (BER) which characterizes the performance at the modulation subsystem level and decoding success rate (DSR) for the messages, which quantifies the performance for the overall system. Specifically, the BER for the primary and secondary data indicates the percentage of erroneous bits, i.e., the percentage of bits in which c.sub.p differs with ĉ.sub.p and c.sub.s differs with ĉ.sub.s, respectively. Similarly, the DSR for the primary and secondary messages indicates the percentage of barcodes from which the messages m.sub.p and m.sub.s, respectively, are successfully recovered after error correction decoding.
[0053] The simulations allow us to effectively explore the system performance for different choices of M and the aforementioned trade-off between primary and secondary data modulation robustness over a wide range of values for the eccentricity parameter ∈, without being overly burdensome in terms of time requirements, and without being impacted by sources of experimental variation (though the simulations do include noise). Specifically, through the simulations, we investigated the performance of DMQR codes for M=2, 4, 8 orientations and values of ∈=0.1, 0.2, . . . , 1.0.
[0054]
[0055]
[0056] The set-up shown in
[0057] The experiments used three different smartphones for displaying the DMQR/QR codes and to capture the images of these barcodes for decoding, we use three laptop webcams and a tablet's front facing camera. The specifications for the capture/display devices are listed in Table 1. The captured images were then used for decoding the DMQR/QR codes using our decoder implementation described earlier.
TABLE-US-00001 TABLE 1 Display and capture devices used for the experiments Capture Operating System Camera Resolution JPEG Display Pixel Devices and Capture Software (pixels) Quality Factor Devices Density (PPI) HP Pavilion Linux 1280 × 720 75 Xiaomi Mi 8 402 Power 15-cb045wm Webcamoid Lenovo Yoga 730 Windows 10 1280 × 720 90 Samsung Galaxy 518 Camera App S6 Edge+ Dell Inspiron 13-7368 Windows 10 1280 × 720 90 Apple iPhone XR 326 Camera App iPad 6th Generation iOS Camera App 1280 × 960 100
[0058]
[0059] In addition to the BER, the DSR was also evaluated in the experiments both for the DMQR codes and conventional QR codes.
APPENDIX A
[0060] For the DMQR codes, the URL https://labsites.rochester.edu/gsharma/ was used as the primary message m.sub.p and the secure passwords g5r[GRw}{circumflex over ( )}Gu*kk{circumflex over ( )}c:Q)s, g5r[GRw}{circumflex over ( )}Gu*kk{circumflex over ( )}c:Q)s/:Sys7q?cgvA5rCM: !s %, and wUXk_}K7ygV!(5{circumflex over ( )}b\backslash.N8y7,wpK-aT} E-RnQ3>k8G}XtfT4yrbKJdGtu(g5r) served as the secondary messages m.sub.s for M=2, 4 and 8, respectively. The intensity modulated c.sub.p yields an encoded Ĩ.sub.0(χ, with 29 modules in the horizontal and vertical directions; thus, Ĩ.sub.0(χ,ζ) has 29×29=841 modules from which N.sub.B=330 (number of modules with ellipses). Error correction for the secondary data utilized a rate 1/2 maximum free distance binary convolutional code from (Cioffi, n.d. Table 10.1, pp. 160), which was first presented in (Johannesson and Zigangirov 1999). The specific code used the generator polynomials specified in octal by [457,755], which has a constraint length of 9 bits (corresponding to 2.sup.9-1=256 states in the decoder trellis) and a free distance of 12 bits.
[0061] As stated above, although the preferred embodiment has been implemented in the format of a QR code, the invention can be implemented in any two-dimensional bar code by encoding data into the bar code modules by using a colored elongated marker instead of a black square and orienting the markers in accordance with the secondary message. A QR code format is not required to practice the invention.
[0062] Although a preferred embodiment has been described above, the invention is limited only by the following claims: