Performance of QR Code Detectors near Nyquist Limits
Abstract
:1. Introduction
2. Background
2.1. QR Codes
- Finder pattern (FIP)—exactly three predefined patterns (or the single one in micro QR).
- Align—zero to many additional patterns for orientation identification.
- Quiet zone.
- Margins.
- Timing—syncing pattern of interleaved 0 and 1’s.
- Information fields such as format and version.
- L (low)—able to correct up to 7% loss.
- M (medium)—able to correct up to 15% loss.
- Q (quartile)—able to correct up to 25% loss.
- H (high)—able to correct up to 30% loss.
2.2. Sampling Limits
2.3. Resolution Capabilities in Digital Imaging
2.4. QR Code Detectors
3. Materials and Methods
3.1. Outline
3.2. Testing Software and Hardware
3.3. Scenarios and Measures
- Simple decoding—this involved the simplest images of just the QR code so it revealed the pure recognition capabilities and performance of decoder, since the overhead to locate QR code was negligible;
- Locate-and-decode— this was focused mainly on QR code locating; we inserted QR codes at random positions into a relatively large background image, so the results were influenced by both the locating and decoding stages in the experiment.
3.3.1. Decoding Performance
3.3.2. Detect-and-Decode Performance
4. Results and Discussion
4.1. Decoding Performance
- It is clearly visible that all detectors achieve high performance with or more for the QR codes with module size of 3 pixels and above, with some advantage of ZBar over its counterparts.
- Despite common belief that ZBar outperforms the other decoders in QR code decoding, we could identify cases when ZXing and OpenCV brought higher . It is so for very small QR codes, where the module size is between 1 and 3 pixels.
- A noteworthy degradation is observed for partial (fractional) scales, when a single source pixel matches a non-integer number of pixels. It is especially visible for OpenCV and ZXing as a repetitive pattern along the scale axis, while ZBar is affected to lesser extent.
- The Nyquist limit (Scale = 1) is generally a difficult situation for any of the decoders; however, they still are able to decode some information. The best results are offered by OpenCV, whereas ZBar returned the poorest results in this case. It conforms also to the results in Figure 11, where the OpenCV offers the best for low scales.
- MTF50 = 0.25 can be considered as the boundary value in the case. Below this, we obtain virtually no positive results.
- Results using various error correction codes are a bit ambiguous. Below Nyquist, only OpenCV is still able to decode little information; the deeper below the Nyquist limit, the lower the results we obtain. A noteworthy fact is that lower levels (L and M) offered the best performance at scale = 0.98, and the Q level was the only case resulting in a few non-zero for scale = 0.95.
- Slightly above the Nyquist (Scale = 1.05), where QR code modules occupy slightly more than one pixel (a thus are dispersed among them), low (L), and, especially, high (H) levels of ECC ensured smaller information loss due to inter-pixel dispersion of modules.
4.2. Detect-and-Decode Performance
- For small scale QR codes (Scale = 1, 1.5) the is close to zero, for all decoders and all MTF50 values, the decoders start to recognize anything at Scale = 2.
- Partial (rational) scales of QR code result in degraded —the same as in the simple decoding task, and the decoders are affected to different extent.
- ZXing and ZBar return quite similar results, whereas OpenCV in general returns notably worse outcomes.
- For the scale ≥ 3.5 ZBar reaches about 0.9, ZXing offers similar but slightly worse performance at such scales; it can be especially observed for lower MTF50 = 0.2.
- The size of image affects mainly at lower scales: 3 and below.
5. Summary and Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
ECC | Error Correction Code |
LUT | Look-up table |
MTF | Modulation Transfer Function |
PSF | Point Spread Function |
QR code | Quick Response code |
RR | Recognition Ratio |
References
- Marino, E.; Barbieri, L.; Colacino, B.; Fleri, A.K.; Bruno, F. An Augmented Reality inspection tool to support workers in Industry 4.0 environments. Comput. Ind. 2021, 127, 103412. [Google Scholar] [CrossRef]
- Maharjan, D.; Agüero, M.; Mascarenas, D.; Fierro, R.; Moreu, F. Enabling human–infrastructure interfaces for inspection using augmented reality. Struct. Health Monit. 2021, 20, 1980–1996. [Google Scholar] [CrossRef]
- Innocente, C.; Ulrich, L.; Moos, S.; Vezzetti, E. Augmented Reality: Mapping Methods and Tools for Enhancing the Human Role in Healthcare HMI. Appl. Sci. 2022, 12, 4295. [Google Scholar] [CrossRef]
- Jin, R.; Zhang, H.; Liu, D.; Yan, X. IoT-based detecting, locating and alarming of unauthorized intrusion on construction sites. Autom. Constr. 2020, 118, 103278. [Google Scholar] [CrossRef]
- Kim, J.S.; Yi, C.Y.; Park, Y.J. Image Processing and QR Code Application Method for Construction Safety Management. Appl. Sci. 2021, 11, 4400. [Google Scholar] [CrossRef]
- Sehgal, A.; Kehtarnavaz, N. Guidelines and Benchmarks for Deployment of Deep Learning Models on Smartphones as Real-Time Apps. Mach. Learn. Knowl. Extr. 2019, 1, 450–465. [Google Scholar] [CrossRef]
- Kan, T.W.; Teng, C.H.; Chen, M.Y. QR Code Based Augmented Reality Applications. In Handbook of Augmented Reality; Furht, B., Ed.; Springer: New York, NY, USA, 2011; pp. 339–354. [Google Scholar] [CrossRef]
- Microsoft. QR Code Tracking—Mixed Reality. Available online: https://docs.microsoft.com/en-us/windows/mixed-reality/develop/platform-capabilities-and-apis/qr-code-tracking#best-practices-for-qr-code-detection (accessed on 16 September 2021).
- Abeles, P. Study of QR Code Scanning Performance in Different Environments. V3. Available online: https://boofcv.org/index.php?title=Performance:QrCode (accessed on 15 September 2021).
- Soon, T.J. QR code. Synth. J. 2008, 2008, 59–78. [Google Scholar]
- Lerner, A.; Saxena, A.; Ouimet, K.; Turley, B.; Vance, A.; Kohno, T.; Roesner, F. Analyzing the Use of Quick Response Codes in the Wild. In Proceedings of the 13th Annual International Conference on Mobile Systems, Applications, and Services (MobiSys ’15), Florence, Italy, 18–22 May 2015; Association for Computing Machinery: New York, NY, USA, 2015; pp. 359–374. [Google Scholar] [CrossRef]
- Kato, H.; Tan, K.T. Pervasive 2D Barcodes for Camera Phone Applications. IEEE Pervasive Comput. 2007, 6, 76–85. [Google Scholar] [CrossRef]
- Shannon, C.E. A mathematical theory of communication. Bell Syst. Tech. J. 1948, 27, 379–423. [Google Scholar] [CrossRef] [Green Version]
- Rossmann, K. Point Spread-Function, Line Spread-Function, and Modulation Transfer Function. Radiology 1969, 93, 257–272. [Google Scholar] [CrossRef] [PubMed]
- Fagard-Jenkin, R.B.; Jacobson, R.E.; Axford, N.R. A Novel Approach to the Derivation of Expressions for Geometrical MTF in Sampled Systems. In Proceedings of the PICS 1999: Image Processing, Image Quality and Image Capture Systems (PICS-99), Savannah, GA, USA, 25–28 April1999; pp. 225–230. [Google Scholar]
- Burns, P.D.; Williams, D. Camera Resolution and Distortion: Advanced Edge Fitting. Electron. Imaging 2018, 2018, 171-1–171-5. [Google Scholar] [CrossRef]
- Li, J.H.; Wang, W.H.; Rao, T.T.; Zhu, W.B.; Liu, C.J. Morphological Segmentation of 2-D Barcode Gray Scale Image. In Proceedings of the 2016 International Conference on Information System and Artificial Intelligence (ISAI), Hong Kong, China, 24–26 June 2016; pp. 62–68. [Google Scholar] [CrossRef]
- Ciążyński, K.; Fabijańska, A. Detection of QR-Codes in Digital Images Based on Histogram Similarity. Image Process. Commun. 2015, 20, 41–48. [Google Scholar] [CrossRef]
- Belussi, L.; Hirata, N. Fast QR Code Detection in Arbitrarily Acquired Images. In Proceedings of the 2011 24th SIBGRAPI Conference on Graphics, Patterns and Images, Maceio, Brazil, 28–31 August 2011; pp. 281–288. [Google Scholar] [CrossRef]
- Yuan, B.; Li, Y.; Jiang, F.; Xu, X.; Guo, Y.; Zhao, J.; Zhang, D.; Guo, J.; Shen, X. MU R-CNN: A Two-Dimensional Code Instance Segmentation Network Based on Deep Learning. Future Internet 2019, 11, 197. [Google Scholar] [CrossRef]
- Brown, J. ZBar Bar Code Reader. Available online: http://zbar.sourceforge.net/index.html (accessed on 15 September 2021).
- Google. ZXing (“Zebra Crossing”) Barcode Scanning Library for Java, Android. Original-Date: 2011-10-12T14:07:27Z. Available online: https://github.com/zxing/zxing (accessed on 15 September 2021).
- OpenCV: cv::QRCodeDetector Class Reference. Available online: https://docs.opencv.org/4.0.0/de/dc3/classcv_1_1QRCodeDetector.html (accessed on 15 September 2021).
- Karrach, L.; Pivarčiová, E.; Bozek, P. Recognition of Perspective Distorted QR Codes with a Partially Damaged Finder Pattern in Real Scene Images. Appl. Sci. 2020, 10, 7814. [Google Scholar] [CrossRef]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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
Skurowski, P.; Nurzyńska, K.; Pawlyta, M.; Cyran, K.A. Performance of QR Code Detectors near Nyquist Limits. Sensors 2022, 22, 7230. https://doi.org/10.3390/s22197230
Skurowski P, Nurzyńska K, Pawlyta M, Cyran KA. Performance of QR Code Detectors near Nyquist Limits. Sensors. 2022; 22(19):7230. https://doi.org/10.3390/s22197230
Chicago/Turabian StyleSkurowski, Przemysław, Karolina Nurzyńska, Magdalena Pawlyta, and Krzysztof A. Cyran. 2022. "Performance of QR Code Detectors near Nyquist Limits" Sensors 22, no. 19: 7230. https://doi.org/10.3390/s22197230
APA StyleSkurowski, P., Nurzyńska, K., Pawlyta, M., & Cyran, K. A. (2022). Performance of QR Code Detectors near Nyquist Limits. Sensors, 22(19), 7230. https://doi.org/10.3390/s22197230