Preprint
Article

This version is not peer-reviewed.

QRGB: App for QR Code Generation (3-in-1 Method), Additive Color Generation Method (RGB), Using Python Programming Code, to Increase Accumulated Information Density

Submitted:

16 July 2024

Posted:

17 July 2024

Read the latest preprint version here

Abstract
The present work titled QRGB consists of the development of a Python application for generating QR codes using the additive color generation method (RGB). This innovative method increases the information density stored in QR codes by using three color layers (red, green, and blue), each representing a different data set. QRGB offers an efficient and secure solution for storing and transmitting large amounts of information in limited spaces, significantly improving the capabilities of traditional black-and-white QR codes.By using three color layers (red, green, and blue), QRGB codes can store up to three times more information in the same space. This technique not only increases storage capacity but also enhances information security, making it more difficult to counterfeit or manipulate the code. The superposition of multiple data layers allows for redundancy implementation, increasing the code's robustness against damage or reading errors.QRGB codes are especially useful in applications that require the transmission of large amounts of data in limited spaces, such as in the packaging industry, digital business cards, and interactive advertising. Additionally, they have great potential in areas such as document and ticket security, where the authenticity and integrity of information are crucial.These points provide a solid foundation for understanding the innovation and advantages of colored QR codes (QRGB) compared to traditional QR codes, highlighting their applicability and potential in various sectors.The Python application developed for QRGB utilizes advanced color image processing techniques, applying models and methods to generate and decode QR codes using the RGB color system, thus enhancing information density and security through the innovative use of additive color layers.
Keywords: 
;  ;  ;  ;  

What Is a Traditional QR Code

A QR (Quick Response) code is a type of two-dimensional barcode that can store information efficiently and quickly. It was created in 1994 by the Japanese company Denso Wave to be used in the automotive industry, although its use has spread to many other areas due to its versatility and storage capacity.
The structure of QR codes is made up of a matrix of black and white modules (dots) that represent the encoded data. The modules are organized in a square and can contain a large amount of information compared to traditional one-dimensional barcodes.
In terms of their storage capacity, QR codes can store various types of data, including numbers, letters, special characters, and even binary data. The amount of information they can contain varies depending on the size and version of the QR code, but they can store up to 7,089 numerical characters or 4,296 alphanumeric characters.
Regarding ease of scanning, one of the most significant advantages of QR codes is that they can be quickly scanned from multiple angles, even if partially damaged, thanks to their error detection and correction patterns. Most smartphones and mobile devices with cameras can scan QR codes using specific apps or the device's camera.
The most common uses of QR codes in marketing and advertising: They are used to provide quick access to websites, promotions and discounts. In mobile payments, QR codes facilitate transactions by scanning a code containing payment information. In inventory management, they help track products and manage inventories in various industries. In information and education, they provide access to additional information about products, services or educational materials.

Components of the QR Code

Pattern Finder: Three large squares in the corners that allow the scanner to identify and orient the QR code.
Alignment Patterns:Small squares that help align the code if it is tilted or distorted.
Timing Patterns: Zigzag lines that help determine the width of the modules.
Data Area: The area containing the encoded data.
Error Correction: Sections containing additional information to recover data if the code is corrupted.
In summary, QR codes are a powerful and versatile tool for the rapid encoding and transfer of information, and their use has spread to multiple sectors due to their ability to store a large amount of data and their ease of scanning.

QR Codes for Personalized Marketing

Using QR codes with images is a creative practice that has evolved over time. Although there is no single pioneer, several companies and developers have contributed to popularizing this technique. Some QR code generators with images include:
-Me-QR: This generator allows you to convert images into QR codes, which provides branding opportunities and greater user engagement.
-QRGateway: Offers advanced functions to create QR codes with images, such as access to promotions, itineraries or product information.
-Canva: Although it does not specialize in QR codes, Canva provides a free generator to create custom QR codes, including images.
-My QR Code: Provides a QR code generator with options to add logos, colors and styles to your QR codes.
In short, the combination of images and QR codes has been adopted by various tools and platforms, offering creative opportunities in marketing, art, and more.
The first QR code with an embedded image to gain public notoriety was not necessarily that of the BBC in London. In fact, the concept of inserting images or logos within QR codes was popularized on various QR code generation platforms such as QRhacker and Pageloot, which allowed users to personalize their codes with photos and logos to improve aesthetics and brand recognition. ​.
These tools not only allowed inserting images, but also modifying the colors and arrangement of the pixels of the code, which led to the creation of more attractive and functional QR codes. Although the creation of the first image QR code cannot be attributed to a single entity, the technology and services to do so were developed around 2012.
However, some of the early notable examples and tools that popularized this technique are:
-Amit Agarwal of Digital Inspiration: Amit Agarwal is known for his technology innovations and tutorials, including customizing QR codes with images and logos. His 2012 article on how to embed images in QR codes helped spread this practice.
-Platforms like QRhacker and Pageloot: These tools have allowed users to create custom QR codes with images since the early 2010s. QRhacker, for example, offered advanced QR code editing options, including the ability to embed photos​​.
Then better QR Codes could be generated in colors and with graphics applied for personalized marketing. For more information see the report in Spanish at the following link: https://www.monografias.com/trabajos101/diseno-codigos-qr-marketing/diseno-codigos-qr-marketing

Theoretical Framework on the Creation of Color QR Codes (QRGB)

In today's digital age, the need to store and transmit large amounts of information efficiently has led to the development of advanced technologies such as colored QR codes (QRGB). This section presents a detailed rationale for why QRGBs represent a significant improvement over traditional QR codes.
-Definition and Limitations of Traditional QR Codes: A QR (Quick Response) code is a type of two-dimensional barcode that can store information efficiently and quickly. It was created in 1994 by the Japanese company Denso Wave for the automotive industry, although its use has spread to many other areas due to its versatility and storage capacity. Traditional QR codes are made up of a matrix of black and white modules (dots) that represent the encoded data (QRGB).
-Justification of Colored QR Codes (QRGB): Traditional black and white QR codes are limited by their data storage capacity. By using three layers of colors (red, green and blue), QRGBs can store up to three times more information in the same space. This is because each color can represent a different set of data, allowing information to be overlaid without increasing the physical size of the code. QRGBs not only increase storage capacity, but also improve information security. Overlaying multiple layers of data can make it difficult to forge or manipulate code. In addition, by having multiple channels of information, redundancy can be implemented, which increases the robustness of the code against damage or reading errors (QRGB).
-Applications and Potential of QRGBs: QRGBs are especially useful in applications where the transmission of large amounts of data in limited spaces is required, such as in the packaging industry, digital business cards and interactive advertising. They also have potential in areas such as document and banknote security, where the authenticity and integrity of information are crucial. Although QRGBs are based on the RGB color model, compatibility with printers using the CMYK model has been considered, ensuring that the codes maintain their integrity and are readable even when printed (QRGB).
-Development of Decoding Algorithms: The development of advanced decoding algorithms that can identify and separate the different color layers is an essential component of QRGBs. These algorithms allow current scanning devices, with minor software modifications, to accurately read and decode the information stored in QRGBs. The introduction of QRGB represents a significant advance in QR code technology, offering substantial improvements in storage capacity, security and applicability (QRGB).

Theory of the Additive RGB Color System and Its Implementation in Color QR Codes (QRGB)

The RGB additive color system is based on the combination of red (Red), green (Green) and blue (Blue) light to create a wide range of colors. Combining these three colors in different intensities can produce any color in the visible spectrum.
The principle behind the RGB system is based on the way the human eye perceives color. Our eyes have three types of receptor cells, known as cones, that are sensitive to red, green and blue wavelengths. When light enters the eye, these cells activate to different degrees depending on the wavelength of the light, and the brain interprets the signals from these cells as color.
In the additive system, colors are created by adding light of different colors.
The primary colors of the RGB system (red, green and blue) are mixed to produce other colors by adding their intensities: Red + Green = Yellow, Red + Blue = Magenta, Green + Blue = Cyan, Red + Green + Blue = White. Each of these secondary colors is the result of the superimposition of two of the primary colors. When the three primary colors are mixed at their maximum intensity, they produce white light.
The RGB system is used in various technologies and applications, mainly in devices that emit light. Some examples include: electronic displays, computer monitors, televisions and mobile phone screens use the RGB system to produce color images. In image projection, video projectors use RGB lamps and filters to project color images onto a screen. LED lighting allows the creation of a wide range of colors by adjusting the intensity of the red, green and blue light-emitting diodes.
The use of the RGB additive system is theoretically justified by the nature of light and the way it interacts with the receptors in the human eye. Visible light is a small part of the electromagnetic spectrum and is made up of waves of different lengths. The cones in our eyes are sensitive to these different wavelengths and allow us to see colors. Red Sensitive Cones (L): Sensitive to long wavelengths (~564–580 nm). Green Sensitive Cones (M): Sensitive to medium wavelengths (~534–545 nm). Blue Sensitive Cones (S): Sensitive to short wavelengths (~420–440 nm). The combination of light from these three primary colors in different proportions allows our brain to perceive a wide range of colors.
The additive RGB color system (Red, Green, Blue) is a model used to create colors in electronic devices by combining light at different intensities, represented by values ​​from 0 to 255. The primary colors are: Red (255, 0, 0), Green (0, 255, 0) and Blue (0, 0, 255). By mixing these colors you get: Red + Green = Yellow (255, 255, 0), Red + Blue = Magenta (255, 0, 255), and Green + Blue = Cyan (0, 255, 255). The combination of all colors produces White (255, 255, 255), while the absence of light generates Black (0, 0, 0). Other colors can also be obtained such as Orange (255, 165, 0) by mixing red and green, Light Green (144, 238, 144) and Light Blue (173, 216, 230) with specific proportions. The RGB system allows you to create a wide range of colors, essential for digital visualization and graphic design. But we will only focus on this one:

Methodology to be Implemented in the Creation and Reading of QRGB Codes

Three individual QR codes are created in the colors red, green and blue, each encoding different parts of the information. These QR codes are generated using Python tools and libraries like PyQRCode and OpenCV. QR codes in red, green and blue overlap to form a single colored QR code. This overlay process is done in the RGB color space, combining the three layers into a single image. For encoding, you work in the CMYK color space to ensure that colors are represented correctly when printing the QR code. Decoding is performed in the RGB color space, using advanced algorithms to separate the different color layers and extract the encoded information. Image processing techniques such as segmentation and thresholding are used to identify and process the color modules in the QR code. This involves analyzing entire modules rather than individual pixels, ensuring better decoding accuracy. Specific algorithms are developed for the decoding of QRGB codes, which can identify and separate the color layers. These algorithms must be able to handle color variations caused by printing and other environmental factors. It ensures that QRGB codes are compatible with current scanning devices, allowing them to read and decode the data stored in the color codes. QRGB codes are tested in various applications, such as document security, digital business cards, and interactive advertising, to validate their effectiveness and security. Continuous evaluation is carried out to improve the methodology and ensure that the codes are robust and reliable in different scenarios.

Development in Repli.it Python Programming Language

Replit.it is an online platform that allows users to write, run, and collaborate on code in various programming languages, including Python. It is especially useful for learning to program, making rapid prototypes, and collaborating on projects easily.
Replit.it Python features are:
-IDE in the Cloud: You don't need to install anything on your computer. You can code from anywhere with Internet access.
-Collaboration: Allows multiple users to work on the same project in real time.
-Support for Multiple Languages: In addition to Python, it supports many other languages ​​such as JavaScript, Ruby, HTML/CSS, among others.
-Packages and Libraries: You can easily install libraries using the terminal, such as pip for Python.
-Simple Deployment: You can create web applications and easily share them with others.
You can access Replit and start using Python through the following link: https://replit.com/languages/online-python-compiler
Enter Replit through the mentioned link, there you must log in with your Gmail account. Once inside, you will be able to select from several simulations, programs or online programming environments (select Python).

Shell Libraries That You Will Need to Install in Repli.it Python

You will first need to install the Python libraries.To use these libraries open your Replit.it Python project (main.py) and go to the tab(in the left panel), find and click the “Shell” tab (to the right of “Console”).
-pip install qrcode[pil]: This command installs the qrcode library, which is used to generate QR codes. The [pil] option indicates that the Pillow dependency must also be installed, which is an image manipulation library required to work with images generated by qrcode.
-pip install pillow: This command installs Pillow, a Python library for opening, manipulating, and saving different image formats. It is very useful for working with images in projects that involve graphics or visualization.
-pip install opencv-python: This command installs OpenCV, a powerful library for computer vision. It is used to perform tasks such as image processing and object detection. It is very versatile and widely used in image analysis projects.
After running (Run) in the Console, the questions (imput) will appear to enter the information of the first, second and third QR code, which in these cases are my Google Scholar, Researchgate and Academia.edu profiles respectively.
Enter the information for the first QR code (Red): https://scholar.google.com/citations?user=WfLtjeoAAAAJ&hl=en
Enter the information for the second QR code (Green): https://www.researchgate.net/profile/Ibar-Federico-Anderson
Enter the information for the third QR code (Blue): https://unlp.academia.edu/IbarFedericoAnderson

Conclusion

Colored QR codes (QRGB) present an innovative solution to the growing demands for data storage and transmission in various sectors. By significantly improving storage capacity and security, QRGBs represent a significant technological advance over traditional QR codes (QRGB).
In today's digital age, the need to store and transmit large amounts of information efficiently has led to the development of advanced technologies such as colored QR codes. Below is a detailed rationale for why QRGBs represent a significant improvement over traditional QR codes.
Traditional black and white QR codes are limited by their data storage capacity. By using three layers of colors (red, green and blue), QRGBs can store up to three times more information in the same space. This is because each color can represent a different set of data, allowing information to be overlaid without increasing the physical size of the code.
QRGBs not only increase storage capacity, but also improve information security. Overlaying multiple layers of data can make it difficult to forge or manipulate code. Additionally, by having multiple channels of information, redundancy can be implemented, which increases the robustness of the code against damage or read errors.
QRGBs are especially useful in applications where the transmission of large amounts of data in limited spaces is required, such as in the packaging industry, digital business cards, and interactive advertising. They also have potential in areas such as document and banknote security, where the authenticity and integrity of information are crucial.
Although QRGBs are based on the RGB color model, compatibility with printers that use the CMYK model has been considered. This ensures that the codes maintain their integrity and are legible even when printed, overcoming one of the main challenges of implementing colored QR codes in the physical world.
The development of advanced decoding algorithms that can identify and separate the different color layers is an essential component of QRGBs. These algorithms allow current scanning devices, with minor software modifications, to accurately read and decode the information stored in QRGBs.
The introduction of QRGBs represents a significant advance in QR code technology, offering substantial improvements in storage capacity, security and applicability. These codes are an innovative solution to the increasing demands for data storage and transmission in various sectors.

References

  1. -Anderson, IF (2013). Design of QR Codes for marketing. Online: https://www.monografias.com/trabajos101/diseno-codigos-qr-marketing/diseno-codigos-qr-marketing.
  2. -Fang, W.P. (2011). Offline QR code authorization based on visual cryptography. In Seventh International Conference on Intelligent Information Hiding and Multimedia Signal Processing (pp. 89–92). IEEE.
  3. -Fu, Z., Cheng, Y., Liu, S., & Yu, B. (2019). A new two-level information protection scheme based on visual cryptography and QR code with multiple decryptions. Measurement, 141, 267-276. [CrossRef]
  4. -Lin, P.Y. (2016). Distributed secret sharing approach with cheater prevention based on QR code. IEEE Transactions on Industrial Informatics, 12(1), 384-392. [CrossRef]
  5. -Liu, T., Yan, B., & Pan, JS (2019). Color visual secret sharing for QR code with perfect module reconstruction. Applied Sciences, 9 (21), 4670. [CrossRef]
  6. Mishra, P. (2016). Region Identification and Decoding Of Security Markers Using Image Processing Tools (Master's thesis, Banasthali Vidyapith, Rajasthan). Manipal University Jaipur. Available in: https://www.researchgate.net/publication/301788314.
  7. -Tan, L., Liu, K., Yan, X., Wan, S., & Chen, J. (2018). Visual secret sharing scheme for color QR code. In 2018 IEEE 3rd International Conference on Image, Vision and Computing (ICIVC) (pp. 961–965). IEEE.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2025 MDPI (Basel, Switzerland) unless otherwise stated