In today’s world, QR codes have become a ubiquitous tool for quickly accessing digital information, found everywhere from restaurant menus to product packaging. However, one challenge remains: QR codes are often printed on uneven surfaces, like cylindrical bottles or irregular food packaging, making them difficult to scan. However, the current study offers a promising solution to this problem.
The research, conducted by a team from the University of Barcelona and published in Pattern Recognition Letters, introduces a new algorithm that dramatically improves the readability of QR codes on non-flat surfaces.
The problem of this study is straightforward. QR codes work well when printed on flat surfaces, they often become distorted on curved or irregular surfaces, which can make them difficult or impossible to scan. This is because traditional QR code scanners rely on planar algorithms that expect the code to be flat and aligned with the scanner.
As lead researcher Ismael Benito-Altamirano explains, “QR codes were originally designed to be scanned in controlled environments like factory production lines. But now they are used in everyday life on surfaces that are far from flat, such as bottles or food packaging, which complicates the scanning process.”
The research team sought to develop a method that could correct these distortions, allowing the QR code to be read more easily, no matter the surface it is printed on. The core of their solution is an algorithm based on thin-plate splines (TPS), a mathematical method commonly used to adjust non-linear deformations. TPS allows the algorithm to “smooth out” the warping effects caused by uneven surfaces and restore the QR code to a readable state.
To better understand how the new system works, consider the example of a QR code on a cylindrical bottle. When you try to scan the code with a smartphone, the curved surface distorts the code, making it unreadable. The TPS algorithm essentially adjusts for this curvature, mapping the distorted code back to a flat, two-dimensional representation that can be easily scanned. In the study, the researchers compared their method with other approaches, including affine, projective, and cylindrical transformations. The results were impressive: the TPS algorithm outperformed these existing methods, increasing the readability of QR codes by a factor of four.
But why is this important?
As QR codes continue to become more embedded in our everyday lives, the ability to scan them reliably on various surfaces becomes crucial for both consumers and industries. This is especially true in sectors like packaging, retail, and food production, where QR codes are used to track inventory, provide product information, and even offer promotions. If a QR code can’t be scanned because of surface irregularities, it can lead to lost information and frustration for users.
The research team tested their algorithm on various datasets of QR codes placed on challenging surfaces. In one test, they used synthetic QR codes to evaluate how different deformations impacted the readability of the code. In another, they tested QR codes on flat surfaces and then applied their algorithm to codes placed on cylindrical and arbitrary surfaces, like bottles and other curved objects. Across the board, their method showed significant improvements in decoding accuracy.
“Our algorithm was able to decode QR codes placed on complex surfaces that traditional methods could not,” notes Benito-Altamirano. This breakthrough has the potential to solve a longstanding issue in QR code technology.
One of the key strengths of the TPS method is its flexibility. Unlike other algorithms that work well only on specific types of surfaces, such as flat or cylindrical objects, TPS can adapt to a wide range of surface types. This makes it an ideal candidate for real-world applications, where QR codes are often printed on objects of all shapes and sizes.
Looking ahead, the research team sees several promising applications for their method. One immediate use is in commercial QR code scanners, which could integrate the TPS algorithm to improve scanning accuracy on curved or uneven surfaces. This could be particularly useful in industries like packaging, where QR codes are often printed on flexible materials that warp and bend.
“We envision our method being used in a variety of industries to improve the reliability of QR code scanning on difficult surfaces,” co-auther David Martínez-Carpena explains.
Moreover, the team also plans to explore how the algorithm could be applied to other types of barcodes or machine-readable patterns, such as DataMatrix codes. These codes are often used in industrial settings for tracking and inventory, and like QR codes, they can be difficult to read on non-flat surfaces. Adapting the TPS method for these codes could expand its usefulness even further.
While the study has made significant strides in improving QR code readability, the researchers acknowledge that there is still more work to be done. Future improvements could involve incorporating perspective components into the TPS algorithm to handle extreme angles or using advanced neural networks to refine the system’s accuracy even further. The researchers are optimistic that these refinements could lead to even better performance in more challenging scanning environments.
For more, visit: https://doi.org/10.1016/j.patrec.2024.06.004