System and method for secure quick response code
Patent Information
- Application Number
- AE202602271
- Authority / Receiving Office
- AE · AE
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-03
- Filing Date
- 2025-01-01
Smart Images

Figure ABST_ABST
Abstract
Description
SYSTEM AND METHOD FORSECURE QUICK RESPONSE CODE FIELD OF THE INVENTION
[0001] The present disclosure generally relates to the field of quick response (QR) codes, more specifically the present disclosure relates to a system and method for providing a secure QR code. BACKGROUND OF THE INVENTION
[0002] The counterfeit industry is rapidly expanding, underscoring the urgent need for efficient countermeasures. Scientists have been working on developing solutions to safeguard consumers against the constant threat of purchasing counterfeit goods. Traditional methods of product fortification, such as Tamper-Evident Packaging (including tamper-evident seals or blister packaging), incorporating counterfeit features like holograms, RFID, or watermarks, and implementing product tracking, are common strategies. However, technological progress has made it easier to replicate these once-effective measures, diminishing their overall effectiveness.
[0003] As a viable alternative, scientists employ multiple security measures to create a comprehensive solution that has proven successful in countering counterfeiting. Nevertheless, these multimodal security features entail a complex generation process utilizing high-precision and sophisticated devices, leading to a significant increase in production costs and limiting their applicability to a broad range of devices.
[0004] One solution tackles the challenge of authenticating products by proposing a method that involves a non-reproducible QR code. In this method, the QR code incorporates a graphic element at its center. During the verification process, users must capture an image of this graphic using a dedicated application. However, it requires high-resolution printing, leading to increased integration costs.
[0005] Another solution introduces a noise print tag, a seal incorporating multiple features such as special ink, fluorescent pigments, and color fibers. Authentication of the noise print tag begins with users capturing multiple images of the tag, using their smartphones. While these multi-modal solutions are generally useful, they require special raw materials and advanced machinery, significantly increasing production costs. Additionally, verification is complex due to the presence of multiple security features.
[0006] A different solution was developed using an anti-counterfeit tag utilizing a physically unclonable function (PUF) and a QR code. The PUF is generated using a special ink that solidifies into random textures upon printing, ensuring each tag is unique. The solution needs to be generated and verified in multiple process steps, providing inconvenience for users. Additionally, the present solution is unable to generate multiple identical secure codes.
[0007] In other literature, authors discuss a technique to transform a monochrome QR code into an anti-counterfeiting QR code while maintaining compatibility with existing QR decoders. The process involves bilinear interpolation on a Gaussian noise matrix, converting it into a binary halftone image where grayscale is represented with black and white squares in a small space. The solution is unable to provide more storage capacity, is relatively difficult to use, and is aesthetically less pleasing. SUMMARY OF THE INVENTION
[0008] This summary is provided to introduce concepts related to systems and methods for secure QR code and the concepts are further described below in the detailed description. This summary is neither intended to identify essential features of the claimed subject matter nor is it intended for use in determining or limiting the scope of the claimed subject matter.
[0009] In one implementation, a method for quick response QR code generation is disclosed. The method comprising selecting, by an interface of a QR device, a set of QR codes from an input set of QR codes having a public QR code and a private QR code, using an optimal mask pattern, by a processor of the QR device, from a plurality of mask patterns, to invert colors of each module of the set of QR codes. The method comprises transforming the set of QR codes, by the processor, using a similarity structure transformation, to create a transitional set of QR codes, the transitional set of QR codes retains data encoded in the set of QR codes and assigning a color from an optimal set of colors to each modules of the transitional set of QR codes, by the processor, the optimal set of colors is calculated while maximizing a distance among a set of colors. The method further comprises generating, by the processor, a lightweight color QR code from the transitional set of QR codes having the assigned colors to each of modules, stacking, by a processor, a QR code from the input set of QR codes as a first QR code and the lightweight color QR code as a last QR code and mapping, by the processor, a special-patterned module to the first QR code and the last QR code and merging, by the processor, the first QR code, the last QR code and the special-patterned module to generate a secure QR code.
[0010] In yet another implementation, embedding a color palette, by the processor, into the lightweight color QR code.
[0011] In yet another implementation, generating a look up table, by the processor, to map the optimal set of colors to each of the modules.
[0012] In yet another implementation, a first region color of the special-patterned module is mapped to the first QR code and a second region color of the special-patterned module is mapped to the last QR code.
[0013] In yet another implementation, mapping, by the processor, a second special-patterned module to the first QR code and the last QR code and merging, by the processor, the first QR code, the last QR code and the second special-patterned module, at selected modules, to generate a second secure QR code.
[0014] In yet another implementation, the set of QR codes has n number of monochrome codes having a public QR code and n-1 number of private QR codes.
[0015] In yet another implementation, the optimal mask pattern is selected from the plurality of mask patterns based on a penalty score.
[0016] In yet another implementation, the distance among the set of colors is maximized where required number of colors are chosen using hexagonal close packing.
[0017] In one implementation, a method for quick response QR code recognition is disclosed. The method comprises acquiring an image, by an interface of a QR device, from a scanning distance and extracting a secure QR code 102 from the image and identifying, by a processor of the QR device, a first scan threshold, a last QR code with a scanning distance more than the first scan threshold. The method comprises identifying, by the processor, the size and location of each of modules from the last QR code and extracting, by the processor, a color palette from the last QR code. The method comprises determining, by the processor, colors for each of the modules of the last QR code, colors for each of the modules is determined using nearest neighbor distance taken with respect to colors in the color palette and preparing, by the processor, a corrected lightweight color QR code using the determined colors and retrieving an encoded data from the corrected lightweight color QR code.
[0018] In yet another implementation, identifying, by the processor, a first QR code with a scanning distance less than the first scan threshold, and extracting, by the processor, a first data from a first QR code of the secure QR code.
[0019] In yet another implementation, obtaining a private data from the retrieved encoded data from the corrected lightweight color QR code.
[0020] In yet another implementation, obtaining a public data from the corrected lightweight color QR code from the image using a public QR decoder.
[0021] In yet another implementation, the corrected lightweight color QR code is prepared using a color lookup table.
[0022] In yet another implementation, the image is acquired using an application installed on a mobile device.
[0023] In yet another implementation, the application acquires the image, by capturing a plurality of frames from the image, merging values from the plurality of frames, repeating the capturing, and merging for all of the frames of the image.
[0024] In one implementation, a system for quick response QR code generation is disclosed. The system comprises a processor and a memory coupled to the processor, the processor executes a plurality of modules stored in the memory, and the plurality of modules comprises an input module for selecting a set of QR codes of an input set of QR codes having a public QR code and a private QR code and an optimal mask module for using an optimal mask pattern, from a plurality of mask patterns, to invert colors of the set of QR codes. The modules comprises a SSTM module for transforming the set of QR codes to create a transitional set of QR codes, the transitional set of QR codes retains data encoded in the set of QR codes, a color module for assigning a color from an optimal set of colors to each of modules of the transitional set of QR codes, the optimal set of colors is calculated while maximizing a distance among a set of colors and generate a lightweight color QR code from the transitional set of QR codes having the assigned colors to each of modules. The modules comprises a stack module for stacking a QR code from the input set of QR codes as a first QR code and the lightweight color QR code as a last QR code and a mapping module for mapping a special-patterned module to the first QR code and the last QR code, and a merging module for merging the first QR code, the last QR code and the special-patterned module to generate a secure QR code.
[0025] In yet another implementation, a first region color of the special-patterned module is mapped to the first QR code and a second region color of the special-patterned module is mapped to the last QR code.
[0026] In yet another implementation, the mapping module for mapping a second special-patterned module to the first QR code and the last QR code and the merging module for merging the first QR code, the last QR code and the second special-patterned module, at selected modules, to generate a second secure QR code.
[0027] In yet another implementation, the color module embeds a color palette into the lightweight color QR code without interfering with the structure of the lightweight color QR code.
[0028] In yet another implementation, a printing device coupled to the processor, the printing device prints the generated lightweight color QR code on a printing medium.
[0029] In yet another implementation, the set of QR codes has n number of monochrome codes having a public QR code and n-1 number of private QR codes.
[0030] In yet another implementation, the color module embeds a color palette into the lightweight color QR code.
[0031] In one implementation, a system for quick response QR code recognition is disclosed. The system comprises a processor and a memory coupled to the processor, the processor executes a plurality of modules stored in the memory, and the plurality of modules comprises a scanning module for acquiring an image from a scanning distance and extracting a secure QR code from the image and an identification module for identifying a first scan threshold, a last QR code with a scanning distance more than the first scan threshold, and a size and location of each of modules from the last QR code. The modules comprises a color module for extracting a color palette from the last QR code and determining colors for each of the modules from the last QR code, colors for each of the modules is determined using nearest neighbor distance that is taken with respect to colors in the color palette and for preparing a corrected lightweight color QR code using the determined colors and retrieving an encoded data from the corrected lightweight color QR code.
[0032] In yet another implementation, an optical decode module for extracting a first data from a first QR code of the secure QR code, the scanning distance is less than the first scan threshold.
[0033] In yet another implementation, the scanning module comprises an image sensor for acquiring the image having the secure QR code.
[0034] In yet another implementation, obtaining a public data and a private data contained in the last QR code.
[0035] It is an object of the disclosure to provide a generation and decoding of a secure QR (SQR) code that provides a convenient solution to the rising challenge of counterfeiting.
[0036] It is an object of the disclosure to provide SQR codes are non-reproducible, provides optics & color induced.
[0037] It is an object of the disclosure to provide a high-storage capacity, data privacy and distance-dependent information.
[0038] It is an object of the disclosure to provide a SQR code that is generated as a combination of lightweight color QR (LWCQR) codes and an optical QR (OQR) codes.
[0039] It is an object of the disclosure to provide a solution that matches an effectiveness of multimodal security features and can be printed on various surfaces in a single step using readily available printers.
[0040] It is an object of the disclosure to provide a solution where QR codes can be verified using any smartphone, having a custom application, substantially reducing both production and verification costs.
[0041] These and other implementations, embodiments, processes, and features of the subject matter will become more fully apparent when the following detailed description is read with the accompanying experimental details. However, both the foregoing summary of the subject matter and the following detailed description of it represent one potential implementation or embodiment and are not restrictive of the present disclosure or other alternate implementations or embodiments of the subject matter. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] A clear understanding of the key features of the subject matter summarized above may be had by reference to the appended drawings, which illustrate the method and system of the subject matter, although it will be understood that such drawings depict preferred embodiments of the subject matter and, therefore, are not to be considered as limiting its scope with regard to other embodiments which the subject matter is capable of contemplating. Accordingly:
[0043] FIGURE.1 illustrates exemplary secure quick response (QR) codes, in accordance with an embodiment of the present subject matter.
[0044] FIGURE.2 illustrates an exemplary generation process for a lightweight color QR code, in accordance with an embodiment of the present subject matter.
[0045] FIGURE.3 illustrates an exemplary generation process for a secure QR code, in accordance with an embodiment of the present subject matter.
[0046] FIGURE.4 illustrates an exemplary recognition process for a secure QR code, in accordance with an embodiment of the present subject matter.
[0047] FIGURE.5 illustrates various exemplary masking patterns available to be used in an exemplary generation process for a secure QR code, in accordance with an embodiment of the present subject matter.
[0048] FIGURE.6 illustrates transformation used in an exemplary generation process for a secure QR code, in accordance with an embodiment of the present subject matter.
[0049] FIGURE.7 illustrates a public QR reader for a secure QR code, in accordance with an embodiment of the present subject matter.
[0050] FIGURE.8 illustrates various exemplary special patterned modules available to be used in an exemplary generation process for a secure QR code, in accordance with an embodiment of the present subject matter.
[0051] FIGURE.9 illustrates a multi-layered secure QR code, in accordance with an embodiment of the present subject matter.
[0052] FIGURE.10 illustrates a mobile application employing a secure QR code used on handheld devices, in accordance with an embodiment of the present subject matter.
[0053] FIGURE.11 illustrates a block diagram illustrating one implementation of a secure QR code, in accordance with an embodiment of the present subject matter.
[0054] FIGURE.12 illustrates a flow chart of the method of generation of a secure QR code, in accordance with an embodiment of the present subject matter.
[0055] FIGURE.13 illustrates a flow chart of the method of recognition of a secure QR code, in accordance with an embodiment of the present subject matter. DETAILED DESCRIPTION OF THE INVENTION
[0056] The following is a detailed description of implementations of the present disclosure depicted in the accompanying drawings. The implementations are in such detail as to clearly communicate the disclosure. However, the amount of detail offered is not intended to limit the implementations. While aspects of described systems and methods for secure QR code generation and recognition can be implemented in any number of different computing systems, environments, and / or configurations, the embodiments are described in the context of the following exemplary system (s).
[0057] Secure quick response (SQR) codes, possess optical features that confer anti-counterfeiting capabilities, substantial data storage capacity, distance-based information, and data privacy. The generation process follows a two-step approach, with the initial step of a generation process of a lightweight color QR (LWCQR) code, while the second step is of a generation process of optical QR (OQR) code.
[0058] SQR codes are specially developed to tackle the proliferation of counterfeit products. The increase in counterfeit products has become a significant and multifaceted problem affecting individuals, government agencies and private businesses. The market is flooded with various counterfeit consumables and non-consumables goods. It permeates not only traditional brick-and-mortar stores but also digital marketplaces, making it difficult to regulate and challenging for consumers to identify genuine products. Counterfeit products have far-reaching effects and exact a price on many fronts. The implications for customers go beyond mere monetary loss and extend to actual health risks. Furthermore, when consumers unwittingly support fake brands, it can have serious repercussions for the manufacturing organization’s reputation as well. If we consider scenarios related to altering or forging important documents of significant worth, it raises serious concerns regarding the nation’s security. There is a need for a solution that can be used to authenticate a product before purchase.
[0059] Presented LWCQR codes are optimized to tackle real-world color-specific challenges like Cross-Channel Interference, which occurs due to the interference of colorants of different color channels while printing, Cross- Module Interference due to overflow of colorant of particular data module to the neighboring data module, resulting in distortion and ultimately degrading the robustness of color-based QR code, and Color shifting is the change in the color between original color-based QR code and its print & scanned version. This can be because of illumination variation, printer and scanner quality. These optimizations enhance the robustness of LWCQR codes and make them compatible for real-world use.
[0060] Existing work to merge one traditional QR code into the other utilized only few modules of the QR code to embed the special patterns and not all, which makes the resultant QR codes less robust. Further, some of these techniques necessitate the use of custom mobile applications for proper decoding instead of public QR readers, which hinders their wide applicability. OQR codes overcome these challenges and provide high robustness and compatibility with public QR readers.
[0061] To achieve non-reproducible properties using QR codes, existing work utilizes special inks, high-resolution printers, fluorescent materials or modified scanning devices, which increase the associated costs and limit the applicability of the solution. On the other hand, the proposed SQR codes can be printed using any colored printer and can be authenticated using just a smartphone installed with the custom mobile application.
[0062] The techniques introduced herein overcome the deficiencies and limitations of the prior art, at least in part, with a system and methods for automating and streamlining the key dimensions: agility, efficiency, and security.
[0063] FIGURE.1 is an exemplary secure quick response (QR) code illustration 100. The proposed next-generation QR code is a secure QR (SQR) code 102, as shown in Figure 1, it is developed to maintain high data security while addressing the imperative to enhance data storage capacity in QR codes and introduce data privacy while upholding partial compatibility with existing or new QR code decoders.
[0064] Secure quick response (SQR) code 102 is generated by including two steps. A first step is to generate SQR requires generation of intermediate LWCQR code. LWCQR generation process involves merging n different monochrome QR codes using color modules in contrast to traditional black-and-white modules. Among these n QR codes, one is designed to be a public QR code and the remaining n − 1 are private QR codes. The public QR code is compatible with publicly available QR code readers while a special application is required to extract the private information.
[0065] These LWCQR codes are optimized to tackle real-world color-specific challenges: Cross-Channel Interference, Cross-Module Interference and Color-Shifting. LWCQR utilizes a novel algorithm that models the color selection task as an optimization problem to handle the above-mentioned color-specific challenges and gives out a non-interfering set of colors, mitigating cross channel interference. Also, as mentioned above, existing Color QR codes may suffer from color-shifting, overhead illumination (low contrast, color fading), noise, chromatic interference, and chromatic distortions incurred due to the printing process (printing inconsistencies, poor distribution of ink at surfaces). A color palette is introduced in the proposed LWCQR to tackle these problems. And, to address the cross-module interference (observed due to densely packed modules in the color-based QR code), it is crucial to reduce the density of the color-based QR codes and increase the sparsity. For this purpose, a novel similar structure transformation method is proposed that transforms the initial set of 2D monochrome QR codes into another set of 2D monochrome QR codes such that the resultant LWCQR obtained by merging these new set of 2D QR codes is comparatively sparse and lightweight.
[0066] The next step involves merging n + 1th monochrome QR code with intermediate LWCQR code into one while retaining the same structure. Here the LWCQR code is considered as Far QR code and the n + 1th QR is considered as a Near QR code. The Near QR code is placed above the Far QR code and integrated using a set of special patterns. These special patterns are specifically designed to leverage the optical property of the camera lens to incorporate a distance-based effect, i.e., they appear different when observed from different distances. As a result, different information can be extracted by scanning the same SQR code from different distances.
[0067] A distinct set of special patterns is employed here, namely “ASP1” and “ASP2.” These patterns feature unique structures and can be customized with colors as needed. The majority of modules utilize the “ASP1” pattern, while a few (randomly chosen) incorporate the “ASP2” pattern. This strategic combination serves to strike a balance between decodability and non-reproducibility.
[0068] Once deployed, the authenticity of the secure QR (SQR) code can be determined by just scanning them using a custom application. The utilized special patterns are designed specifically to undergo certain changes upon reproduction that will hamper their decoding. Reproduced / counterfeit SQR codes will provide only partial information in contrast to genuine SQR codes which can be determined by the custom application.
[0069] In an embodiment, a secure QR (SQR) code 102 is shown. The SQR code 102 utilizes a method for generation that models the color selection task as an optimization problem to handle the mentioned color-specific challenges and gives out a non-interfering set of colors 106, 108, 114, 116 mitigating cross-channel interference. The non-interfering set of colors 106, 108, 114, 116 are in any number, any pattern, any combination and in any ratio on the QR code as per business or code requirement to generate a lightweight color QR code. A special pattern module having modules 110, 112, 118, 120 is merged with the lightweight color QR code to generate the SQR code 102. A color palette 104, corresponding to the set of colors 106, 108, 114, 116 is introduced in the SQR code 102 to tackle these problems as described above.
[0070] FIGURE.2 is an exemplary generation process 200 for generating a lightweight color QR code, such as a lightweight color QR (LWCQR) code 222.
[0071] The LWCQR code 222 is generated by merging n different traditional QR codes using color modules in contrast to conventional black-and-white modules. Among these n QR codes, one is designed to be a public QR code and the remaining n − 1 are private QR codes. The public QR code is compatible with publicly available QR code readers while a special application is required to extract the private information. The LWCQR code 222 is optimized to tackle real-world color-specific challenges: cross-channel interference, cross-module interference, and color-shifting.
[0072] The LWCQR code 222 utilizes a method for generation that models the color selection task as an optimization problem to handle the above-mentioned color-specific challenges and gives out a non-interfering set of colors mitigating cross-channel interference. The non-interfering set of colors are in any number, any pattern, any combination and in any ratio on the QR code as per business or code requirement. Importantly, existing color QR codes may suffer from color-shifting, overhead illumination (low contrast, color fading), noise, chromatic interference, and chromatic distortions incurred due to the printing process (printing inconsistencies, poor distribution of ink at surfaces). A color palette, corresponding to the set of colors is introduced in the LWCQR code 222 to tackle these problems. And, to address the cross-module interference (observed due to densely packed modules in the color-based QR code), it is crucial to reduce the density of the color-based QR codes and increase the sparsity. For this purpose, a similar structure transformation method is proposed that transforms the initial set of 2D monochrome QR codes into another set of 2D monochrome QR codes such that the resultant LWCQR obtained by merging these new set of 2D QR codes is comparatively sparse and lightweight.
[0073] In an embodiment, n is the number of 2D monochrome QR codes required to generate into a LWCQR code, where set QA represents the public QR code. And QB be the set of n−1 private monochrome QR codes. Mathematically, the set QA and set QB are represented as:QA = {Q1}(1)QB = {Q2, Q3, ..., Qn}(2)Here, QA ∩ QB = ϕ. Importantly, all the QR codes used are assumed to have the same version & error correction so that the positional patterns & other modules overlap each other and the resultant LWCQR code follows the same structure as the traditional QR code.
[0074] In order to generate the LWCQR code 222, the task is to merge multiple monochrome n QR codes 202. Traditional techniques suffer from color-specific challenges: cross channel interference, cross-module interference, and color-shifting and it is crucial to improvise the generation algorithm accordingly for better robustness and readability. Initially, to address these challenges in LWCQR codes a similarity structure transformation method 206 is utilized where all the n QR codes are transformed such that their resultant structure 208 is similar to each other. This transformative process hinges on optimal mask selection 204, strategically amplifying the sparsity of the resulting CQR codes. It is important to note that the transformation step 206 doesn’t alter the data encoded in these QR codes. The optimal mask selection 204 is further detailed in Figure 5.
[0075] To increase structural similarity, a two-step process: Unmasking of the n QR codes and re-masking of the unmasked QR codes obtained from step 1 to the new set of QR codes with optimal mask. Both steps are mathematically represented as:Q))(3)Q))(4)where fu & fm represent the unmasking and masking function. In the next step, the similarity matrices are computed corresponding to each private QR code in set Q′B with public QR code Q′A. This is done by computing XOR between public QR code Q′1 and each QR code Q′Bi in set Q′B, referred as in Figure 2. This results in new set X with similarity matrices. Mathematically, it is written as:X (5)After obtaining the set X, the union of public QR code Q′1 with the set X results in a new set C with n layers, which is mathematically written as:C= Q′1 ∪ X = {Q′1, X12,X13,...,X1n} (6)QR codes consist of modules and each module in the public QR code & X has values of either 0 or 1. If n QR codes are arranged in a sequential manner, each module can be represented using different colors, where a particular color represents a particular underlying sequential combination. Since the LWCQR code consists of n layers, therefore, 2^n unique sequential combinations can occur while assigning colors. This means 2^n colors are required for assigning colors to the sequential combinations. For this purpose, a novel color selection methodology is used that is specially designed to output non-interfering set of colors useful to mitigate the problem of cross channel interference. Let S represents the set with t number of colors where, t = 2^n. Each color Si is a 3-dimensional vector with elements xi, yi, and zi representing the red, green, and blue colors in RGB space. The range of xi, yi, and zi is between 0 to 255 i.e., 0 ≤ x,y,z ≤ 255. The aim is to minimize the cross-channel interference among different colors. For this purpose, the distance among the colors is maximized. Mathematically, it is written as:maximize i ̸= j(7)where, D(.) represents the function to compute the distance between color Si and Sj.
[0076] In this work, two different strategies are used to solve the above problem based on the parameter t, which represents the required number of colors for the LWCQR code 222. If t ≤ 8, then the required colors can be directly chosen using standard RGB combinations where either a color component is present or not. Since there are three color channels, eight different color combinations exist which are sufficient up to 3-layer LWCQR code 222. In the case of t > 8, the above-mentioned color selection problem can be seen as a “sphere packing problem in a cube”. This problem involves arranging non-overlapping spheres within a cubic container to maximize efficiency, which is the ratio of the total volume occupied by the spheres to the volume of the cube itself. Solving this sphere packing problem directly contributes to color selection, as optimally packed spheres are positioned at their maximum possible distances from each other. Consequently, the centres of these spheres can be considered as the desired color selections.
[0077] Among various strategies for addressing the “sphere packing problem in a cube,” the Hexagonal Close Packing (HCP) configuration stands out with an efficiency of nearly 74%. This means that HCP efficiently utilizes about 74% of the available space in the cube, making it an appealing choice for color selection when t > 8.Mathematically, if there are n identical spheres corresponding to n colors in an RGB cube, then the radius of the sphere can be computed as:(8)(9)where r is the radius of the sphere and a is the side of the cube.
[0078] Next, it is critical that the selected colors ensure the compatibility of the LWCQR code 222 with public QR readers. To tackle this challenge, a two-step approach is employed. Initially, the optimal colors obtained earlier are reorganized into ascending order based on their magnitudes. Subsequently, an ordered color set 212 is divided into two equal subsets, each containing 2^n-1 colors. The first subset comprises dark colors or those with smaller magnitudes, while the second subset contains light colors with larger magnitudes. Following this, each color in these subsets is adjusted by multiplying them by constants k1 and k2, where k1 ≤ 1 for dark colors and k2 ≥ 1 for light colors. This adjustment or optimization 214 results in dark colors becoming even darker, and light colors becoming lighter. Now, a lookup table 216 is generated to map the optimal set of colors with all possible sequential combinations of modules 208. Importantly, the sequential patterns corresponding to the black color in the public QR code are assigned dark colors and vice versa. Using this lookup table 216, concatenated layers 210 of the set C are assigned colors 218, which outputs the color-based LWCQR code 222 using a color palette 220.
[0079] Lastly, to effectively address the issues arising from color shifts and variations in illumination, the color palette 220, referred to as P, has been integrated into the LWCQR Code 222. This palette encompasses the complete spectrum of 2^n colors utilized in the generation of the LWCQR code 222. Nevertheless, the incorporation of P presents a distinct challenge: it must be integrated in a manner that does not compromise the decodability of the LWCQR code 222.
[0080] The LWCQR code 222 takes advantage of the distinct properties of optimal colors, which can be categorized into two subgroups: light and dark colors, to tackle this challenge. In any QR code, including LWCQR, the outermost structure of the positional pattern is comprised solely of black (dark-colored) modules, followed by a separator composed of white (light-colored) modules. Leveraging this structural pattern, the palette P 104 is positioned towards the end of the top-left positional pattern, as shown in Figure 1. In doing so, light colors are placed within the separator region, while dark colors are positioned on the outermost structure of the positional pattern. This strategic arrangement ensures that P does not interfere with the core decodability of the LWCQR code 222. The LWCQR code 222 is similar to a LWCQR code described otherwise in other examples.
[0081] FIGURE.3 illustrates an exemplary generation process 300 for a secure QR code.
[0082] Now the SQR code 102 is generated using LWCQR code (L) 222 as described above, an another traditional QRn+1 QR code from 206is embedded at 306 into the LWCQR code 222, where L is considered as the “Far” QR code and Qn+1 as “Near”. Now the next process is similar to the one employed for OQR code 304 generation. Basically, the QRn+1 is placed over L and merged using a different set of special patterns ASP1. Notably, given the presence of the LWCQR code 222 as opposed to a monochrome QR code, the special patterns are modified to a customised but secure and unique structure. The centre region color is taken from the corresponding module of “Near” QR and the outer region from “Far” QR. As a result, the special pattern is not monochrome anymore, instead they are updated according to the color of the underlying LWCQR code module. In scenarios where a particular module in QRn+1 is black and corresponds to one of the dark colors within the LWCQR code, the resulting SQR code adopts the same color as the LWCQR code and lacks a special pattern. The same applies if the module color in QRn+1 is white and aligns with one of the light colors within the LWCQR code. However, in the remaining two scenarios, significant variations emerge. In these cases, the color of the outer special pattern matches the color of the LWCQR module, while the inner special pattern aligns with the color of the QRn+1 module.
[0083] Furthermore, an additional special pattern “ASP2” is strategically embedded 306 within SQR codes 308 at certain modules (chosen randomly) and transforms shape 310 of intermediate SQR code 308 to generate a desired secure QR (SQR) code 102. This second special pattern draws inspiration from copy detection patterns and adheres to the same color strategy as the initial special pattern. It’s important to note that the first special patterns are robust, ensuring successful SQR code decoding. However, their inherent robustness somewhat diminishes their sensitivity to multiple print and scan processes, a crucial factor in counterfeit detection. To strike a balance, the introduction of the second special pattern becomes pivotal. These new patterns are intentionally designed to be highly fragile and undergo substantial alterations upon reproduction, enhancing their effectiveness in detecting counterfeit versions.
[0084] To maximize the efficacy of SQR codes in detecting counterfeiting products, they are meticulously printed within predefined size limits and shape. This strategic control is essential, as excessively reduced dimensions would render the original SQR code non-decodable as well. Conversely, enlarged sizes could facilitate the effortless replication of SQR codes, thereby defeating the primary purpose.
[0085] FIGURE.4 is an exemplary recognition process 400 for recognising a secure QR code 102. A decoding or a SQR code recognition process requires a custom mobile application that captures a real-time image of a SQR code, such as a SQR code 102, from a readable medium 402, subsequently extracting the embedded data from all n constituent QR codes. The procedure commences by scanning a SQR code 102 using a public QR decoder 404, that localises & crop the SQR code 102. The extraction of encoded information from SQR codes necessitates the use of a custom mobile application. Since, SQR codes are compatible with public QR readers, they can be utilized to localize the QR in the image. Hence, the custom application initiates the process by capturing a real-time image of the SQR code and then localises & crop the SQR code using public QR readers. The perspective transforms and change the shape to a square 406 is done.
[0086] Subsequently specialized preprocessing algorithms 408 are used to enhance image quality & eliminate undesirable noise in extracted SQR code 410. Now, the last QRn+1 and first QR1 can be easily extracted by scanning the SQR code 102 from a “Near” & “Far” distance, respectively. The near code is the public QR code 412 decoded to public information 414. To extract information encoded in intermediary LWCQR code 422, completely reversed process of LWCQR generation is utilized. This involves a series of steps, including color palette detection 416, color assignment to each module 418, and the generation of individual QR codes based on a lookup table 424. It’s worth emphasizing that all this information can be effortlessly extracted if the SQR code is genuine. Conversely, if an SQR code is not genuine, only public information 414 can be extracted with relative ease. And the decoding rate for private information is significantly lower. To ascertain the authenticity of an SQR code, the custom application captures multiple images of the code and calculates the decoding success ratio. This ratio serves as a decisive metric in determining whether the SQR code is genuine or counterfeit.
[0087] The following steps are performed to access the private information contained within the LWCQR code 422: the LWCQR code 422 exhibits a likeness to in the grayscale & binarized representation. It signifies that public QR code readers can be utilized to acquire this critical information: LWCQR’s finder pattern and its version. Utilizing this, the exact location of LWCQR code in the secure code 102 is determined and it is separated from the rest of the readable medium 402. Now due to difference in the camera viewpoints, every time the image is captured, a segmented LWCQR code at 410 is not a perfect square. To correct this, the segmented LWCQR code is mapped to a square using a perspective transformation technique 406. Further, certain preprocessing algorithms 408 helps increase the quality of the segmented and transformed LWCQR code, reduce unwanted noise and enhance contrast to provide extracted LWCQR code “Is”. The extracted QR code “Is” aids in determining the size and location 420 of each module necessary for further decoding. Now, due to the printing process followed by capturing the LWCQR code with illumination variation, the color palette P of the original LWCQR code is transformed to color palette PS in the extracted LWCQR code “Is”.
[0088] The extracted QR code “Is” aids in determining the size and location of each module necessary for further decoding at a determining step. Now, due to the printing process followed by capturing the LWCQR code with illumination variation, the color palette P of the original LWCQR code is transformed to color palette PS in the captured image of LWCQR code “Is”. Since the sequence of the colors is already known in the color palette P and PS, the mapping M of colors from a color palette P to PS is generated. For retrieving the original colors of each data module in the LWCQR code “Is”, the nearest neighbor distance is taken with respect to colors in color palette PS. Mathematically, the distance of any data module IS(x,y) is computed as:(10)where, IR,S(x,y) represents the color of the retrieved data module of the captured image. Each color IR,S(x,y) is a subset of set PS i.e. IR,S(x,y) ⊂ PS. Using the above equation, all the data modules are retrieved of the captured image, and it gives the output retrieved image, a corrected LWCQR code “Ir,s”. Determine underlying combination (using lookup table 424), in order to retrieve the original LWCQR code IR 102 with pre-determined optima colors, each color IR,S(x,y) of IR,S are mapped to the new colors using the mapping M defined above. Using this method, the final retrieved LWCQR code (multiple monochrome codes n) 422 is obtained.
[0089] Finally, to decode the retrieved LWCQR code 422, the reverse of the encoding process is applied. Initially, the colors in IR are mapped to their corresponding bit patterns using the lookup table. This step effectively translates the colors back into their original binary representations. Subsequently, the sequential pattern is split to obtain the n layer set CR. Within this set, the first layer corresponds to the retrieved public QR code , while the remaining layers 202 represent the retrieved similarity matrices. In the final step, the XOR (exclusive OR) operation is applied between the retrieved similarity matrices and the retrieved public QR code. This operation yields the retrieved monochrome QR codes, which are devoid of color information and can be easily decoded using any public QR code reader.
[0090] FIGURE.5 depicts various exemplary masking patterns 500 available to be used in an exemplary generation process for a secure QR code.
[0091] QR code specifications define that there are eight different masking patterns 502, also represented and discussed as 202, which are used to invert the color of the modules of a QR code according to a specific rule, which helps QR decoders extract the encoded information conveniently. These are represented as 502a-Mask, 502b-Mask, 502c-Mask, 502d-Mask, 502p-Mask, 502q-Mask, 502r-Mask, 502s-Mask. Every monochrome QR code is generated using one of these mask patterns, which is determined on the basis of a penalty score. The mask that results provided the least penalty score is the optimal one. This penalty score depends on various factors including the occurrence of multiple same-colored modules together, the ratio of black-colored modules to white-colored modules and the existence of some specific patterns. If the penalty function is ignored, then each monochrome QR code can be represented with eight different monochrome QR codes with the same data corresponding to eight different mask patterns.
[0092] To generate the lightweight color QR, all the underlying monochrome QR codes 502 should be of the same mask. However, the same penalty score can’t be directly used for LWCQRs because of the presence of multiple monochrome QR codes. Considering the above-mentioned issue, a custom penalty rule is generated based on the existing penalty rule. Among n QR codes used to generate LWCQR code, the public QR code Q1 was found to be the most stable due to its compatibility with public QR readers. Hence the custom penalty rule only considers the set QB to determine theOoptimal. As mentioned in Equation (11), the set Oinitial contains the individual optimal masking patterns for the n − 1 QR codes in the set QB.Oinitial = {o2,o3,...on}(11)As per Equation (12), the set Ounqiue is determined which contains the unique masking patterns from the set Oinitial. Suppose there exist k such unique mask patterns where k ≤ 8.Ounique = Unique(Oinitial) = {op1,op2,...opk}(12)Now the penalty score corresponding to op1 mask pattern for all the n − 1 QR codes in the set QB is aggregated. This process is repeated for every mask pattern in the set Ounique, resulting in k new aggregated penalty scores. Finally, the mask pattern with minimum aggregated penalty score is chosen as the Ooptimal.
[0093] FIGURE.6 is transformation 600 used in an exemplary generation process for a secure QR code. The figure represents a similar structure transformation method (SSTM) to make a resultant LWCQR code lightweight & sparse, which makes them robust against cross-module interference.
[0094] SSTM is the process used to increase the structural similarity between different QR codes such that the resultant QR code is lightweight and less dense. The process for the same is as follows: Using given n data values, their monochrome QR codes are generated (602, 604, 606 and 608) using publicly available QR generators. Among these only the private QR codes i.e. 604, 606 and 608 are considered and the optimal masking pattern is determined. Then on every QR codes a reverse masking process (unmasking) is applied, where the color of specific modules is flipped based on a defined formula. Every masking pattern has an underlying formula to flip bit color. So, from one unmasked QR codes, new QR codes, which are 610, 612, 614 and 616, are generated with the optimal masking pattern. Later these structurally similar QR codes are merged to generate modified LWCQR code 618.
[0095] FIGURE.7 is a public QR reader example 700 for a secure QR code, such as a secure QR code 102. A LWCQR code of the secure code 102 uses a similarity structure transformation method, as described earlier, that is utilized where all the n QR codes are transformed such that a resultant structure 208. The resultant structure 208 has both public QR code and private QR codes. The figure shows the compatibility of LWCQR codes with public QR code readers. Public QR code readers convert a captured image of LWCQR code 222 to a grayscale code 704 and then binarize it, using standard thresholding techniques. A resultant binarized LWCQR code 706 resembles a public QR code 702a, which is then decoded and the value in 702a can be extracted. This step doesn’t require any custom decoder application. However, private QR codes 702b and 702c can’t be decoded using this strategy, providing privacy. They require a custom application which is detailed further.
[0096] FIGURE.8 illustrates various exemplary special patterned modules 800 available to be used in an exemplary generation process for a secure QR code, such as a secure QR code 102.
[0097] Adaptations are made to a special pattern “ASP1”. The special patterns are modified to a new structure. The first region or a centre region color 822b, 824a is taken from a corresponding module of “Near” QR and a second region or an outer region from 822a, 824b “Far” QR. As a result, the special pattern is not monochrome anymore, instead its updated according to the color of an underlying LWCQR code module. A special pattern module 820 shows an instance of the modified special pattern “ASP1” 822, 824. In scenarios where a particular module in QRn+1 is black and corresponds to one of the dark colors within the LWCQR code, the resulting SQR code adopts the same color as the LWCQR code and lacks a special pattern. The same applies if the module color in QRn+1 is white and aligns with one of the light colors within the LWCQR code. However, in the remaining two scenarios, significant variations emerge. In these cases, the color of the outer special pattern matches the color of the LWCQR module, while the inner special pattern aligns with the color of the QRn+1 module. The two patterns of each modules are shown as 822a, 822b; and 824a, 824b.
[0098] Furthermore, an additional special pattern “ASP2” 826, 828 is strategically embedded within SQR codes at certain modules (chosen randomly). This second special pattern, shown, draws inspiration from copy detection patterns and adheres to the same color strategy as the initial special pattern. It’s important to note that the first special patterns are robust, ensuring successful SQR code decoding. However, their inherent robustness somewhat diminishes their sensitivity to multiple print and scan processes, a crucial factor in counterfeit detection. To strike a balance, the introduction of the second special pattern becomes pivotal. These new patterns are intentionally designed to be highly fragile and undergo substantial alterations upon reproduction, enhancing their effectiveness in detecting counterfeit versions. The two patterns of each modules are shown as 826a, 826b; and 828a, 828b.
[0099] FIGURE.9 is a multi-layered secure QR code illustration 900 as shown and described further. A secure QR code 918 is depicted. The secure QR code 918 is similar to a secure QR code 102 as described earlier or in other examples. The secure QR code 918 has a QR code 1 in layer 902, a QR code 2 in layer 906, a QR code 3 in layer 910, and a QR code 4 in layer 914.
[00100] In one example, the secure QR code 918 is a result of encoding a keyword “Cry” from the layer 902, a keyword “Eat” from the layer 906, a keyword “Run” from the layer 910, and a keyword “Sleep” from the layer 914. The layer 902 is merged as a public QR code and using the special patterned module, the layer 906 is merged as a public QR code of a light weight QR code and the layer 910, 914 are merged as the private QR codes of the light weight QR code and steps 904, 908, 912, and 916, structurally transforms 902, 906, 910, and 914 respectively. The public QR values 902, 906 can be decoded using any public QR code scanner, the private QR values 910, 914 can only be obtained using a custom application. The encoding happens using a method for quick response (QR) code generation as shown in illustrations of Figure 2 or otherwise above.
[00101] In one example, the secure QR code 918 is a result of encoding a keyword “Accomplishment” from the layer 902, a keyword “Beautification” from the layer 906, a keyword “Characteristic” from the layer 910, and a keyword “Simplification” from the layer 914. The layer 902 is merged as a public QR code and using the special patterned module, the layer 906 is merged as a public QR code of a light weight QR code and the layer 910, 914 are merged as the private QR codes of the light weight QR code and steps 904, 908, 912, and 916, structurally transforms 902, 906, 910, and 914 respectively. The public QR values 902, 906 can be decoded using any public QR code scanner, the private QR values 910, 914 can only be obtained using a custom application. The encoding happens using a method for quick response (QR) code generation as shown in illustrations of Figure 2 or otherwise above.
[00102] In one example, a SQR code is experimentally tested and uses a particular type of underlying monochrome QR codes with following specifications, Monochrome QR Code Version – 2; Monochrome QR Code Error Correction – H; and some additional specification of SQR code are as follows: Number of Layers – 4; Tilt - tan(𝑡ℎ𝑒𝑡𝑎) = 0. 56; Print Size = 2.5 cm; Non-reproducible Accuracy = 96%.
[00103] FIGURE.10 is a mobile application 1000 employing a method for recognising a secure QR code on handheld devices. A custom mobile application / app has been created to decode / recognise the private values in a secure QR code. The secure QR code is similar to a secure QR code 102 as described earlier or otherwise in other examples. The custom mobile application ensures the compatibility of all secure QR codes with a public QR code reader on various platforms. In one depiction, a mobile device 1002 is shown with a number of mobile application / app as 1004a, 1004b. The custom mobile application is shown in 1006 on the device. The custom application 1006 on the mobile device 1002 is used to scan a secure QR code printed on a paper or any medium for authentication, data transfer / read application. The custom application 1006 on the mobile device 1002 invokes the method for quick response (QR) code recognition as disclosed earlier and reads the multiple layer data encoded in the secure QR code 102. In one example, a handheld QR code scanning device 1002a is shown. The custom mobile application 1006 is used by the handheld QR code scanning device 1002a, it has a processor connected through an application in its memory or connected to a server outside the device 1002a. The custom application 1006 is used to scan a secure QR code printed on a paper or any medium for authentication, data transfer / read application. Various types of QR code scanners can be used.
[00104] The generation and recognising codes of the mobile application can be designed as a combined application or also as two separate applications. Both the generation and recognising / decoding process can work offline without internet connectivity. The mobile applications can be use on a cell phone, a tablet, a computer, or any other telecom device.
[00105] In one example, a custom Android application have also been generated to extract the encoded values in the SQR code and also determine the authenticity of SQR code. Further, to ensure the compatibility of with public QR code readers, an open-source Android-based application is utilized. Experimental Data is as follows: SQR code - 300 4-layer SQR codes were generated and then printed using multiple printers. Multiple printers were used to analyse the dependency on the printers. These printed SQR codes were then tested using two smartphones with different camera resolution under different lighting condition.
[00106] When a lightweight color QR code of the secure QR code is printed and subsequently captured, multiple factors come into play that can impact the color and overall quality of the captured lightweight color QR code. These factors include lighting conditions, printing quality, the resolution and camera quality of the capturing device, paper quality, and various others. Consequently, the color captured differs from the original colors utilized in generating the lightweight color QR code. To address this disparity, the custom application 1006 employs a multi-step approach. Firstly, it locates and extracts a color palette 104. Then, for each module in the lightweight color QR code, its corresponding color is identified. Subsequently, the custom application 1006 calculates the distance between this identified color and every color in the color palette 104. The color with the minimum distance is deemed the true color. Finally, this true color is mapped back to the original color using the known positions of colors in the color palette 104. This comprehensive process aims to reconcile the differences and ensure accurate color reconstruction in the captured LWCQR code.
[00107] The lightweight color QR code decoding application operates in real-time, capturing frames to detect and decode QR codes, akin to popular scanning applications. If lightweight color QR code decoding remains unsuccessful, another frame is captured, and the same process is repeated. For every frame the following scenarios are possible.
[00108] QR detected and successfully decoded: All the values present in the LWCQR are successfully extracted and promptly visible to the user.
[00109] QR detected and partially decoded: LWCQR consists of N monochrome QR codes and this scenario represents when some of the N monochrome QR codes weren’t decoded successfully due to factors such as lighting conditions, printing quality, capturing quality or tampering. Then, the application stores the partially extracted values, captures another frame, and attempts to decode the LWCQR again. The values from both frames are merged and if all values are successfully extracted after merging, the application displays the result. Otherwise, the process is repeated with another frame.
[00110] QR detected but Not Decoded: This scenario represents when the frame contains the QR code but none of the stored values could be extracted by the decoding process. As a result, the application discards the current frame, captures another frame, and repeats the entire process.
[00111] QR code not detected: This indicates the absence of a QR code in the frame. Similar to other cases, the application discards the current frame and searches for a QR code in the next frame.
[00112] The custom application 1006 can discern these cases and display the applicable scenario for each frame.
[00113] In the case of a blurred QR code, certain changes are observed in the color palette as well. Knowing the order of the color palette allows for matching actual colors with blurred colors based on this order. Then, the color for each module is determined by finding the most similar color from the palette and mapping it back to the original color. However, despite these techniques, the application acknowledges that all scenarios remain possible based on the level of blurring and other factors impacting image quality, such as the capturing device, printing device, lighting, or additional noise.
[00114] If the color palette is tampered, the success of decoding an LWCQR code is drastically reduced. The application handles the situation in two steps: First it assumes that the color palette is present and not tampered. It tries to decode the LWCQR code using the colors present at the location of color palette. But since the color palette is modified, only the public information can be extracted using either custom application or publicly available QR code readers. Private information can’t be recovered. In the next step, the process utilizes the initial color information employed in creating the LWCQR code. It's important to note that these colors may not precisely match those perceived in the printed and captured LWCQR code due to potential factors such as illumination variation, print and scan noise, among others. These variations can significantly alter the captured colors from the original ones, posing a challenge to accurate decoding. The outcome is contingent on the quality of the LWCQR code image. In this scenario, it is very difficult to extract the private information.
[00115] The custom application uses a method for quick response QR code that acquires an image, using an interface of a QR device, from a scanning distance and extracts a secure QR code 102 from the image and identifying a first scan threshold, a last QR code with a scanning distance more than the first scan threshold, using image processing techniques. It identifies the size and location of each of modules from the last QR code and extracts a color palette from the last QR code. Further, it determines colors for each of the modules of the last QR code, colors for each of the modules is determined using nearest neighbor distance taken with respect to colors in the color palette and prepares a corrected lightweight color QR code using the determined colors and retrieving an encoded data from the corrected lightweight color QR code. It also scans a first QR code with a scanning distance less than the first scan threshold and extracts a first data from a first QR code of the secure QR code. The custom application obtains a private data from the retrieved encoded data from the corrected lightweight color QR code and obtains a public data from the corrected lightweight color QR code from the image using a public QR decoder. The corrected lightweight color QR code is prepared using a color lookup table and the image is acquired using an application installed on a mobile device.
[00116] FIGURE.11 is a block diagram 1100 illustrating one implementation of a secure QR code. The secure QR code is similar to a secure QR code as described earlier or otherwise in other examples.
[00117] In one implementation, a quick response (QR) code system 1120 implements a method for Secure QR (SQR) code generation and SQR code recognition on a server 1102, the system 1120 includes a processor(s) 1122, an interface(s) 1124, and a memory 1126 coupled to the processor(s) 1122. The quick response (QR) code system 1120 is also implemented on a QR device 1002, 1002a or alike. The processor(s) 1122 may be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, logic circuitries, and / or any devices that manipulate signals based on application environment migration instructions. Among other capabilities, the processor(s) 1122 is configured to fetch and execute computer-readable instructions stored in the memory 1126. Although the present subject matter is explained by considering a scenario that the system is implemented as an application on a server, the systems and methods can be implemented in a variety of computing systems. The computing systems that can implement the described method(s) include, but are not restricted to, mainframe computers, workstations, personal computers, desktop computers, minicomputers, servers, multiprocessor systems, laptops, tablets, SCADA systems, smartphones, mobile computing devices and the like.
[00118] The interface(s) 1124 may include a variety of software and hardware interfaces, for example, a web interface, a graphical user interface, etc., allowing the system 1120 to interact with a user. Further, the interface(s) 1124 may enable the system 1120 to communicate with other computing devices, such as web servers and external data servers (not shown in figure). The interface(s) 1124 can facilitate multiple communications within a wide variety of networks and protocol types, including wired networks, for example LAN, cable, etc., and wireless networks such as WLAN, cellular, or satellite. The interface(s) 1124 may include one or more ports for connecting a number of devices to each other or to another server.
[00119] A network used for communicating between all elements may be a wireless network, a wired network, or a combination thereof. The network can be implemented as one of the different types of networks, such as intranet, local area network LAN, wide area network WAN, the internet, and the like. The network may either be a dedicated network or a shared network. The shared network represents an association of the different types of networks that use a variety of protocols, for example, Hypertext Transfer Protocol HTTP, Transmission Control Protocol / Internet Protocol TCP / IP, Wireless Application Protocol WAP, and the like, to communicate with one another. Further the network may include a variety of network devices, including routers, bridges, servers, computing devices. The network further has access to storage devices residing at a client site computer, a host site server or computer, over the cloud, or a combination thereof and the like. The storage has one or many local and remote computer storage media, including one or many memory storage devices, databases, and the like.
[00120] The memory 1126 can include any computer-readable medium known in the art including, for example, volatile memory (e.g., RAM), and / or non-volatile memory (e.g., EPROM, flash memory, etc.). In one embodiment, the memory 1126 includes module(s) 1128 and system data 1142.
[00121] The modules 1128 further includes an input module 1130, an optimal mask module 1132, a SSTM module 1134, a color module 1136, an identification module 1138, a scanning module 1140, a mapping module 1150, a merging module 1152, a stack module 1154, an optical decode module 1156 and other modules. The memory 1126 further includes system data 1142 that serves, amongst other things, as a repository for storing data fetched, processed, received, and generated by one or more of the modules 1128. The system data 140 includes, for example, operational data, workflow data, and other data at a storage 1144. The system data 1142 has the storage 1144, represented by 1144a, 1144b, …, n, as the case may be. In one embodiment, the system data 1142 has access to the other databases over a web or cloud network 1110. The storage 1144 includes multiple databases
[00122] The input module 1130 is used for selecting a set of QR codes of an input set of QR codes having a public QR code and a private QR code, the set of QR codes has n number of monochrome codes having a public QR code and n-1 number of private QR codes.
[00123] The optimal mask module 1132 is for using an optimal mask pattern, from a plurality of mask patterns, to invert colors of the set of QR codes.
[00124] The SSTM module 1134 is for transforming the set of QR codes to create a transitional set of QR codes, wherein the transitional set of QR codes retains data encoded in the set of QR codes.
[00125] The color module 1136 for assigning a color from an optimal set of colors to each of modules of the transitional set of QR codes, wherein the optimal set of colors is calculated while maximizing a distance among a set of colors and generate a lightweight color QR code 222 from the transitional set of QR codes having the assigned colors to each of modules. the color module 1136 embeds a color palette 104 into the lightweight color QR code 222 without interfering with the structure of the lightweight color QR code 222. The color module embeds a color palette 104 into the lightweight color QR code 222. The color module is also for extracting a color palette 104 from the last QR code 102 and determining colors for each of the modules from the last QR code 102, wherein colors for each of the modules is determined using nearest neighbor distance that is taken with respect to colors in the color palette 104 and for preparing a corrected lightweight color QR code using the determined colors and retrieving an encoded data from the corrected lightweight color QR code.
[00126] The identification module 1138 is for identifying a first scan threshold, a last QR code with a scanning distance more than the first scan threshold, and a size and location of each of modules from the last QR code.
[00127] The scanning module 1140 is for acquiring an image from a scanning distance and extracting a secure QR code 102 from the image. It also comprises an image sensor for acquiring the image having the secure QR code 102.
[00128] The mapping module 1150 is for mapping a special-patterned module to the first QR code and the last QR code 222, a first region color of the special-patterned module is mapped to the first QR code and a second region color of the special-patterned module is mapped to the last QR code 222. The mapping module 1150 is also for mapping a second special-patterned module to the first QR code and the last QR code 222 and the merging module 1152 for merging the first QR code, the last QR code 222 and the second special-patterned module, at selected modules, to generate a second secure QR code 102.
[00129] The merging module 1152 is for merging the first QR code, the last QR code 222 and the special-patterned module to generate a secure QR code 102
[00130] The stack module 1154 is for stacking a QR code from the input set of QR codes as a first QR code and the lightweight color QR code 222 as a last QR code
[00131] The optical decode module 1156 is for for extracting a first data from a first QR code of the secure QR code 102, wherein the scanning distance is less than the first scan threshold.
[00132] FIGURE.12 is a flow chart 1200 of the method of generation of a secure QR code.
[00133] Further, the flowcharts are provided to aid in understanding the illustrations and are not to be used to limit scope of the claims. The flowcharts depict example operations that can vary within the scope of the claims. Additional operations may be performed; fewer operations may be performed; the operations may be performed in parallel; and the operations may be performed in a different order.
[00134] At step 1202, the system is configured to select a set of QR codes from an input set of QR codes having a public QR code and a private QR code. In an embodiment, the selecting is by an interface 1124 of a QR device / system 1120.
[00135] At step 1204, the system is configured to use an optimal mask pattern from a plurality of mask patterns to invert colors of each module of the set of QR codes. In an embodiment, the configuring is by a processor 1122 of the QR device / system 1120 using an optimal mask module 1132 of modules 1128 residing in a memory 1126 coupled to the processor 1122.
[00136] At step 1206, the system is configured to transform the set of QR codes using a similarity structure transformation, to create a transitional set of QR codes that retains data encoded in the set of QR codes. In an embodiment, the transforming is by the processor 1122 using a SSTM module 1134 of the modules 1128 residing in the memory 1126 coupled to the processor 1122.
[00137] At step 1208, the system is configured to assign a color from an optimal set of colors to each modules of the transitional set of QR codes, the optimal set of colors is calculated while maximizing a distance among a set of colors. In an embodiment, assigning is by the processor 1122 using a color module 1136 of the modules 1128 residing in the memory 1126 coupled to the processor 1122.
[00138] At step 1210, the system is configured to generate a lightweight color QR code from the transitional set of QR codes having the assigned colors to each of modules.
[00139] At step 1212, the system is configured to stack a QR code from the input set of QR codes as a first QR code and the lightweight color QR code as a last QR code. In an embodiment, the stacking is by the processor 1122 using a stack module 1154 of the modules 1128 residing in the memory 1126 coupled to the processor 1122.
[00140] At step 1214, the system is configured to mapping a special-patterned module to the first QR code and the last QR code. In an embodiment, the mapping is by the processor 1122 using a mapping module 1150 of the modules 1128 residing in the memory 1126 coupled to the processor 1122.
[00141] At step 1216, the system is configured to merging the first QR code, the last QR code and the special-patterned module to generate a secure QR code. In an embodiment, the merging is by the processor 1122 using a merging module 1152 of the modules 1128 residing in the memory 1126 coupled to the processor 1122.
[00142] FIGURE.13 is a flow chart 1300 of the method of recognition of a secure QR code.
[00143] At step 1302, the system is configured to acquire an image from a scanning distance and extracting a secure QR code from the image. In an embodiment, the acquiring is by a scanning module 1140 of an interface 1124 of a QR device / system 1120.
[00144] At step 1304, the system is configured to identify a first scan threshold, a last QR code with a scanning distance more than the first scan threshold. In an embodiment, the identifying is by a processor 1122 of the QR device / system 1120 using an identification module 1138 of modules 1128 residing in a memory 1126 coupled to the processor 1122.
[00145] At step 1306, the system is configured to identify the size and location of each of modules from the last QR code. In an embodiment, the identifying is by a processor 1122 of the QR device / system 1120 using the identification module 1138 of modules 1128 residing in a memory 1126 coupled to the processor 1122.
[00146] At step 1308, the system is configured to extract a color palette from the last QR code. In an embodiment, extracting is by the processor 1122 using a color module 1136 of the modules 1128 residing in the memory 1126 coupled to the processor 1122.
[00147] At step 1310, the system is configured to determine colors for each of the modules of the last QR code, colors for each of the modules is determined using nearest neighbor distance taken with respect to colors in the color palette. In an embodiment, extracting is by the processor 1122 using the color module 1136 of the modules 1128 residing in the memory 1126 coupled to the processor 1122.
[00148] At step 1312, the system is configured to prepare a corrected lightweight color QR code using the determined colors and retrieving an encoded data from the corrected lightweight color QR code. In an embodiment, extracting is by the processor 1122 using the color module 1136 of the modules 1128 residing in the memory 1126 coupled to the processor 1122.
[00149] Although implementations of system and method for secure QR code have been described in language specific to structural features and / or methods, it is to be understood that the appended claims are not necessarily limited to the specific features or methods described. Rather, the specific features and methods are disclosed as examples of implementations for secure QR code.
Claims
1. A method for quick response (QR) code generation, the method comprising:selecting, by an interface (1124) of a QR device (1002), a set of QR codes from an input set of QR codes having a public QR code and a private QR code;using an optimal mask pattern, by a processor (1122) of the QR device (1002), from a plurality of mask patterns (202), to invert colors of each module of the set of QR codes;transforming the set of QR codes, by the processor (1122), using a similarity structure transformation, to create a transitional set of QR codes, wherein the transitional set of QR codes retains data encoded in the set of QR codes;assigning a color from an optimal set of colors to each modules of the transitional set of QR codes, by the processor (1122), wherein the optimal set of colors is calculated while maximizing a distance among a set of colors;generating, by the processor (1122), a lightweight color QR code (222) from the transitional set of QR codes having the assigned colors to each of modules;stacking, by a processor (1122), a QR code from the input set of QR codes as a first QR code and the lightweight color QR code (222) as a last QR code;mapping, by the processor (1122), a special-patterned module to the first QR code and the last QR code (222);merging, by the processor (1122), the first QR code, the last QR code (222) and the special-patterned module to generate a secure QR code (102). 2. The method as claimed in claim 1, further comprising: embedding a color palette (104), by the processor (1122), into the lightweight color QR code (222). 3. The method as claimed in claim 1, further comprising: generating a look up table, by the processor (1122), to map the optimal set of colors to each of the modules. 4. The method as claimed in claim 1, wherein a first region color of the special-patterned module is mapped to the first QR code and a second region color of the special-patterned module is mapped to the last QR code (222). 5. The method as claimed in claim 1, further comprising: mapping, by the processor (1122), a second special-patterned module to the first QR code and the last QR code (222) and merging, by the processor (1122), the first QR code, the last QR code (222) and the second special-patterned module, at selected modules, to generate a second secure QR code (102). 6. The method as claimed in claim 1, wherein the set of QR codes has n number of monochrome codes having a public QR code and n-1 number of private QR codes. 7. The method as claimed in claim 1, wherein the optimal mask pattern is selected from the plurality of mask patterns based on a penalty score. 8. The method as claimed in claim 1, wherein the distance among the set of colors is maximized where required number of colors are chosen using hexagonal close packing. 9. A method for quick response (QR) code recognition, the method comprising:acquiring an image, by an interface (1124) of a QR device (1002), from a scanning distance and extracting a secure QR code (102) from the image;identifying, by a processor (1122) of the QR device (1002), a first scan threshold, a last QR code with a scanning distance more than the first scan threshold;identifying, by the processor (1122), the size and location of each of modules from the last QR code;extracting, by the processor (1122), a color palette (104) from the last QR code;determining, by the processor (1122), colors for each of the modules of the last QR code, wherein colors for each of the modules is determined using nearest neighbor distance taken with respect to colors in the color palette (104);preparing, by the processor (1122), a corrected lightweight color QR code using the determined colors and retrieving an encoded data from the corrected lightweight color QR code. 10. The method as claimed in claim 9, further comprising: identifying, by the processor (1122), a first QR code with a scanning distance less than the first scan threshold, and extracting, by the processor (1122), a first data from a first QR code of the secure QR code (102). 11. The method as claimed in claim 9, the method further comprising: obtaining a private data from the retrieved encoded data from the corrected lightweight color QR code. 12. The method as claimed in claim 9, the method further comprising: obtaining a public data from the corrected lightweight color QR code from the image using a public QR decoder. 13. The method as claimed in claim 9, wherein the corrected lightweight color QR code is prepared using a color lookup table. 14. The method as claimed in claim 9, wherein the image is acquired using an application installed on a mobile device. 15. The method as claimed in claim 9, wherein the application acquires the image, by capturing a plurality of frames from the image, merging values from the plurality of frames, repeating the capturing, and merging for all of the frames of the image. 16. A system for quick response (QR) code generation, the system comprising:a processor (1122); anda memory (1126) coupled to the processor (1122), wherein the processor (1122) executes a plurality of modules (1128) stored in the memory (1126), and wherein the plurality of modules (1128) comprising:an input module (1130) for selecting a set of QR codes of an input set of QR codes having a public QR code and a private QR code;an optimal mask module (1132) for using an optimal mask pattern, from a plurality of mask patterns, to invert colors of the set of QR codes;a SSTM module (1134) for transforming the set of QR codes to create a transitional set of QR codes, wherein the transitional set of QR codes retains data encoded in the set of QR codes;a color module (1136) for assigning a color from an optimal set of colors to each of modules of the transitional set of QR codes, wherein the optimal set of colors is calculated while maximizing a distance among a set of colors;and generate a lightweight color QR code (222) from the transitional set of QR codes having the assigned colors to each of modules;a stack module (1154) for stacking a QR code from the input set of QR codes as a first QR code and the lightweight color QR code (222) as a last QR code;a mapping module (1150) for mapping a special-patterned module to the first QR code and the last QR code (222);a merging module (1152) for merging the first QR code, the last QR code (222) and the special-patterned module to generate a secure QR code (102). 17. The system as claimed in claim 16, wherein a first region color of the special-patterned module is mapped to the first QR code and a second region color of the special-patterned module is mapped to the last QR code (222). 18. The system as claimed in claim 16, further comprising: the mapping module (1150) for mapping a second special-patterned module to the first QR code and the last QR code (222) and the merging module (1152) for merging the first QR code, the last QR code (222) and the second special-patterned module, at selected modules, to generate a second secure QR code (102). 19. The system as claimed in claim 16, the color module (1136) embeds a color palette (104) into the lightweight color QR code (222) without interfering with the structure of the lightweight color QR code (222). 20. The system as claimed in claim 16, further comprising: a printing device coupled to the processor (1122), wherein the printing device prints the generated lightweight color QR code (222) on a printing medium. 21. The system as claimed in claim 16, wherein the set of QR codes has n number of monochrome codes having a public QR code and n-1 number of private QR codes. 22. The system as claimed in claim 16, wherein the color module embeds a color palette (104) into the lightweight color QR code (222). 23. A system for quick response (QR) code recognition, the system comprising:a processor (1122); anda memory (1126) coupled to the processor (1122), wherein the processor (1122) executes a plurality of modules (1128) stored in the memory (1126), and wherein the plurality of modules (1128) comprising:a scanning module (1140) for acquiring an image from a scanning distance and extracting a secure QR code (102) from the image;an identification module (1138) for identifying a first scan threshold, a last QR code with a scanning distance more than the first scan threshold, and a size and location of each of modules from the last QR code;a color module (1136) for extracting a color palette (104) from the last QR code (102) and determining colors for each of the modules from the last QR code (102), wherein colors for each of the modules is determined using nearest neighbor distance that is taken with respect to colors in the color palette (104) and for preparing a corrected lightweight color QR code using the determined colors and retrieving an encoded data from the corrected lightweight color QR code. 24. The system as claimed in claim 23, further comprising an optical decode module (1156) for extracting a first data from a first QR code of the secure QR code (102), wherein the scanning distance is less than the first scan threshold. 25. The system as claimed in claim 23, wherein the scanning module (1140) comprises an image sensor for acquiring the image having the secure QR code (102). 26. The system as claimed in claim 23, further comprising: obtaining a public data and a private data contained in the last QR code.