A Fast Adaptive Binarization Method for QR Code Images Based on Dynamic Illumination Equalization
Abstract
:1. Introduction
- The loss of vital decoding information during the binarization process;
- An inadequate processing speed that fails to satisfy real-time requirements for practical applications, such as a logistics sorting system;
- The limited adaptability of the binarization approach to complex lighting conditions.
2. Related Work
3. Proposed Method
3.1. Unevenly Illuminated Position Detection Pattern Algorithm
3.2. Fast Adaptive Binarization Method
Algorithm 1: Pseudo-code of fast adaptive binarization method. |
Input: QR code image with uneven illumination Output: Binary QR code image
|
3.3. Effective Principle Analysis
4. Experimental Results
5. Discussion
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Hassan, R.; Qamar, F.; Hasan, M.K.; Aman, A.H.M.; Ahmed, A.S. Internet of things and its applications: A comprehensive survey. Symmetry 2020, 12, 1674. [Google Scholar] [CrossRef]
- Gupta, A.; Asad, A.; Meena, L.; Anand, R. IoT and RFID-Based Smart Card System Integrated with Health Care, Electricity, QR and Banking Sectors. In Artificial Intelligence on Medical Data; Springer: New York, NY, USA, 2023; pp. 253–265. [Google Scholar]
- Tkachenko, I.; Puech, W.; Destruel, C.; Strauss, O.; Gaudin, J.M.; Guichard, C. Two-Level QR Code for Private Message Sharing and Document Authentication. IEEE Trans. Inf. Forensics Secur. 2016, 11, 571–583. [Google Scholar] [CrossRef]
- Saraubon, K.; Chinakul, P.; Chanpen, R. Asset Management System using NFC and IoT Technologies. In Proceedings of the 2019 3rd International Conference on Software and e-Business (ICSEB 2019), Tokyo, Japan, 9–11 December 2019; pp. 124–128. [Google Scholar]
- Yan, L.Y.; Tan, G.W.H.; Loh, X.M.; Hew, J.J.; Ooi, K.B. QR code and mobile payment: The disruptive forces in retail. J. Retail. Consum. Serv. 2021, 58, 102300. [Google Scholar] [CrossRef]
- Kumar, J.; Akhila, K.; Gaikwad, K.K. Recent Developments in Intelligent Packaging Systems for Food Processing Industry: A Review. J. Food Process. Technol. 2021, 12, 895. [Google Scholar]
- Escobedo, P.; Ramos-Lorente, C.E.; Ejaz, A.; Erenas, M.M.; Martínez-Olmos, A.; Carvajal, M.A.; García-Núñez, C.; de Orbe-Payá, I.; Capitán-Vallvey, L.F.; Palma, A.J. QRsens: Dual-purpose Quick Response code with built-in colorimetric sensors. Sens. Actuators B Chem. 2022, 376, 133001. [Google Scholar] [CrossRef]
- Ahlawat, S.; Rana, C.; Sindhu, R. A Review on QR Codes: Colored and Image Embedded. Int. J. Adv. Res. Comput. Sci. 2017, 8, 410–413. [Google Scholar]
- Nazemzadeh, P.; Fontanelli, D.; Macii, D.; Palopoli, L. Indoor Localization of Mobile Robots Through QR Code Detection and Dead Reckoning Data Fusion. IEEE/ASME Trans. Mechatron. 2017, 22, 2588–2599. [Google Scholar] [CrossRef]
- Di, Y.J.; Shi, J.P.; Mao, G.Y. A QR code identification technology in package auto-sorting system. Mod. Phys. Lett. B 2017, 31, 19–21, 1740035. [Google Scholar] [CrossRef]
- Yao, S.; Li, P.; He, L.; Li, Y. Uneven Illumination Two-Dimensional Code Image Recognition Algorithm Research. In Proceedings of the 2018 2nd IEEE Advanced Information Management, Communicates, Electronic and Automation Control Conference (IMCEC), Xi’an, China, 25–27 May 2018; pp. 2043–2046. [Google Scholar]
- Mustafa, W.A.; Yazid, H.; Jaafar, M. An improved sauvola approach on document images binarization. J. Telecommun. Electron. Comput. Eng. 2018, 10, 43–50. [Google Scholar]
- Chen, R.; Yu, Y.; Xu, X.; Wang, L.; Zhao, H.; Tan, H.Z. Adaptive Binarization of QR Code Images for Fast Automatic Sorting in Warehouse Systems. Sensors 2019, 19, 5466. [Google Scholar] [CrossRef]
- Chen, R.; Li, W.; Lan, K.; Xiao, J.; Wang, L.; Lu, X. Fast Adaptive Binarization of QR Code Images for Automatic Sorting in Logistics Systems. Electronics 2023, 12, 286. [Google Scholar] [CrossRef]
- Wei, X.; Manori, A.; Devnath, N.; Pasi, N.; Kumar, V. QR Code Based Smart Attendance System. Int. J. Smart Bus. Technol. 2017, 5, 1–10. [Google Scholar] [CrossRef]
- Rotsios, K.; Konstantoglou, A.; Folinas, D.; Fotiadis, T.; Hatzithomas, L.; Boutsouki, C. Evaluating the Use of QR Codes on Food Products. Sustainability 2022, 14, 4437. [Google Scholar] [CrossRef]
- Tiwari, S. An Introduction to QR Code Technology. In Proceedings of the 2016 International Conference on Information Technology (ICIT), Bhubaneswar, India, 22–24 December 2016; IEEE: Piscataway, NJ, USA, 2016; pp. 39–44. [Google Scholar]
- Kan, T.W.; Teng, C.H.; Chou, W.C. Applying QR code in augmented reality applications. In Proceedings of the 8th International Conference on Virtual Reality Continuum and its Applications in Industry (VRCAI), Yokohama, Japan, 14–15 December 2009; Spencer, N.S., Ed.; Association for Computing Machinery (ACM): New York, NY, USA, 2009; pp. 253–257. [Google Scholar]
- Michalak, H.; Okarma, K. Robust Combined Binarization Method of Non-Uniformly Illuminated Document Images for Alphanumerical Character Recognition. Sensors 2020, 20, 2914. [Google Scholar] [CrossRef]
- Guo, Z.; Zheng, H.; You, C.; Xu, X.; Wu, X.; Zheng, Z.; Ju, J. Digital Forensics of Scanned QR Code Images for Printer Source Identification Using Bottleneck Residual Block. Sensors 2020, 20, 6305. [Google Scholar] [CrossRef]
- Zhang, Y.; Gao, T.; Li, D.; Lin, H. An Improved Binarization Algorithm of QR Code Image. In Proceedings of the 2012 2nd International Conference on Consumer Electronics, Communications and Networks (CECNet), Yichang, China, 21–23 April 2012; IEEE: Piscataway, NJ, USA, 2012; pp. 2376–2379. [Google Scholar]
- He, Y.; Yang, Y. An Improved Sauvola Approach on QR Code Image Binarization. In Proceedings of the 11th International Conference on Advanced Infocomm Technology (ICAIT), Jinan, China, 18–20 October 2019; pp. 6–10. [Google Scholar]
- Zhou, J.; Liu, Y.; Li, P. Research on Binarization of QR Code Image. In Proceedings of the 2010 International Conference on Multimedia Technology, Ningbo, China, 29–31 October 2010; IEEE: Piscataway, NJ, USA, 2010; pp. 1–4. [Google Scholar]
- Jing, J.; Wang, K.; Wang, W. Research on correction and recognition of QR code on cylinder. In Proceedings of the 2021 IEEE 4th Advanced Information Management, Communicates, Electronic and Automation Control Conference (IMCEC), Chongqing, China, 18–20 June 2021; IEEE: Piscataway, NJ, USA, 2021; pp. 1485–1489. [Google Scholar]
- Yang, L.; Feng, Q. The Improvement of Bernsen Binarization Algorithm for QR Code Image. In Proceedings of the 2018 5th IEEE International Conference on Cloud Computing and Intelligence Systems (CCIS), Nanjing, China, 23–25 November 2018; pp. 931–934. [Google Scholar]
- Huo, L.; Zhu, J.; Singh, P.K.; Pavlovich, P.A. Research on QR image code recognition system based on artificial intelligence algorithm. J. Intell. Syst. 2020, 30, 855–867. [Google Scholar] [CrossRef]
- Chen, R.; Zheng, Z.; Yu, Y.; Zhao, H.; Ren, J.; Tan, H.Z. Fast Restoration for Out-of-Focus Blurred Images of QR Code with Edge Prior Information via Image Sensing. IEEE Sens. J. 2021, 21, 18222–18236. [Google Scholar] [CrossRef]
- Song, R.; Zhang, Z.; Liu, H. Edge connection based Canny edge detection algorithm. J. Inf. Hiding Multimed. Signal Process. 2017, 8, 740–747. [Google Scholar] [CrossRef]
- Li, S.; Kang, X.; Fang, L.; Hu, J.; Yin, H. Pixel-level image fusion: A survey of the state of the art. Inf. Fusion 2017, 33, 100–112. [Google Scholar] [CrossRef]
- Han, S.; Bae, H.J.; Kim, J.; Shin, S.; Choi, S.E.; Lee, S.H.; Kwon, S.; Park, W. Lithographically encoded polymer microtaggant using high-capacity and error-correctable QR code for anti-counterfeiting of drugs. Adv. Mater. 2012, 24, 5924–5929. [Google Scholar] [CrossRef]
- Bai, X.; Zhou, F.; Xue, B. Image enhancement using multi scale image features extracted by top-hat transform. Opt. Laser Technol. 2012, 44, 328–336. [Google Scholar] [CrossRef]
- Zhang, H.; Zhang, C.; Yang, W.; Chen, C.Y. Localization and navigation using QR code for mobile robot in indoor environment. In Proceedings of the IEEE International Conference on Robotics and Biomimetics (ROBIO), Zhuhai, China, 6–9 December 2015; pp. 2501–2506. [Google Scholar]
- Szentandrási, I.; Herout, A.; Dubská, M. Fast detection and recognition of QR codes in high-resolution images. In Proceedings of the 28th spring conference on computer graphics (SCCG), Smolenice, Slovakia, 2–4 May 2012; pp. 129–136. [Google Scholar]
- Chen, B.; Shi, L.; Cao, Z.; Niu, S. Layerwise Adversarial Learning for Image Steganography. Electronics 2023, 12, 2080. [Google Scholar] [CrossRef]
- Lin, P.Y. Distributed secret sharing approach with cheater prevention based on QR code. IEEE Trans. Ind. Inform. 2016, 12, 384–392. [Google Scholar] [CrossRef]
- Zhang, W.; Yang, T. An Improved Algorithm for QR Code Image Binarization. In Proceedings of the 2014 International Conference on Virtual Reality and Visualization, Shenyang, China, 30–31 August 2014; IEEE: Piscataway, NJ, USA, 2014; pp. 154–159. [Google Scholar]
- Chen, S.-K.; Ti, Y.-W. A Design of Multi-Purpose Image-Based QR Code. Symmetry 2021, 13, 2446. [Google Scholar] [CrossRef]
- Li, Y.; Ren, J.; Yan, Y.; Petrovski, A. CBANet: An End-to-end Cross Band 2-D Attention Network for Hyperspectral Change Detection in Remote Sensing. IEEE Trans. Geosci. Remote Sens. 2023, 61, 5513011. [Google Scholar] [CrossRef]
- Ma, P.; Ren, J.; Sun, G.; Zhao, H.; Jia, X.; Yan, Y.; Zabalza, J. Multiscale superpixelwise prophet model for noise-robust feature extraction in hyperspectral images. IEEE Trans. Geosci. Remote Sens. 2023, 61, 5508912. [Google Scholar] [CrossRef]
- Xie, G.; Ren, J.; Marshall, S.; Zhao, H.; Li, R.; Chen, R. Self-attention enhanced deep residual network for spatial image steganalysis. Digit. Signal Process. 2023, 139, 104063. [Google Scholar] [CrossRef]
- Chen, R.; Huang, H.; Yu, Y.; Ren, J.; Wang, P.; Zhao, H.; Lu, X. Rapid Detection of Multi-QR Codes Based on Multistage Stepwise Discrimination and A Compressed MobileNet. IEEE Internet Things J. 2023, 10, 15966–15979. [Google Scholar] [CrossRef]
Hardware | Parameters |
---|---|
Computer | OS: Ubuntu 20.04.1 LTS |
CPU: AMD Ryzen 7 3700x 8-core processor*16 3.6 GHz | |
Laser printer | Model: HP M226dw |
Printed resolution: 600 × 600 dpi | |
Mobile phone | Xiaomi 6 rear camera: 12 million pixels |
Software | Version |
---|---|
Matlab | R2020a |
Wechat—python libraries (Opencv) | 4.6.0.66 |
Zxing—python libraries | 1.0 |
Type | Metrics | Yao et al. [11] | Di et al. [10] | Chen et al. [13] | Chen et al. [14] | Proposed Method |
---|---|---|---|---|---|---|
I | PSNR | 3.6233 | 3.6467 | 3.8228 | 3.8622 | 5.4935 |
SSIM | 0.0747 | 0.0691 | 0.0814 | 0.0938 | 0.1853 | |
II | PSNR | 3.6364 | 4.0827 | 4.2031 | 4.2256 | 5.2199 |
SSIM | 0.0929 | 0.1145 | 0.1230 | 0.1290 | 0.1774 | |
III | PSNR | 3.9251 | 3.8745 | 3.9076 | 3.9337 | 4.4706 |
SSIM | 0.1296 | 0.0950 | 0.0991 | 0.1030 | 0.1658 | |
IV | PSNR | 4.1405 | 4.1384 | 4.0535 | 4.1148 | 5.3732 |
SSIM | 0.1129 | 0.1270 | 0.1241 | 0.1247 | 0.2247 | |
V | PSNR | 3.8826 | 3.6375 | 3.6163 | 3.6217 | 5.5479 |
SSIM | 0.0825 | 0.0791 | 0.0781 | 0.0768 | 0.2162 |
Method | Average Processing Speed (s/Image) | Recognition Rate (%) | |
---|---|---|---|
Zxing | |||
None | — | 35.00 | 48.75 |
Yao et al. [11] | 0.0520 | 37.50 | 42.50 |
Di et al. [10] | 0.5953 | 53.75 | 71.25 |
Chen et al. [13] | 0.3165 | 88.75 | 92.50 |
Chen et al. [14] | 0.0199 | 92.50 | 97.50 |
Proposed method | 0.0164 | 95.00 | 98.75 |
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. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Chen, R.; Huang, Y.; Lan, K.; Li, J.; Ren, Y.; Hu, X.; Wang, L.; Zhao, H.; Lu, X. A Fast Adaptive Binarization Method for QR Code Images Based on Dynamic Illumination Equalization. Electronics 2023, 12, 4134. https://doi.org/10.3390/electronics12194134
Chen R, Huang Y, Lan K, Li J, Ren Y, Hu X, Wang L, Zhao H, Lu X. A Fast Adaptive Binarization Method for QR Code Images Based on Dynamic Illumination Equalization. Electronics. 2023; 12(19):4134. https://doi.org/10.3390/electronics12194134
Chicago/Turabian StyleChen, Rongjun, Yue Huang, Kailin Lan, Jiawen Li, Yongqi Ren, Xianglei Hu, Leijun Wang, Huimin Zhao, and Xu Lu. 2023. "A Fast Adaptive Binarization Method for QR Code Images Based on Dynamic Illumination Equalization" Electronics 12, no. 19: 4134. https://doi.org/10.3390/electronics12194134
APA StyleChen, R., Huang, Y., Lan, K., Li, J., Ren, Y., Hu, X., Wang, L., Zhao, H., & Lu, X. (2023). A Fast Adaptive Binarization Method for QR Code Images Based on Dynamic Illumination Equalization. Electronics, 12(19), 4134. https://doi.org/10.3390/electronics12194134