1. The Cylindrical Distortion Problem
When a flat QR code is wrapped around a cylindrical surface (such as an aluminum soda can or glass bottle), the left and right edges recede away from the camera lens. This causes tangential optical foreshortening: the square modules on the outer columns appear compressed into thin rectangles.If the apparent aspect ratio of the outer modules drops below 2:1, standard binarization filters fail to recognize the modules.
2. The Arc-Length to Diameter Formula
To prevent scan failure on cylindrical containers, the horizontal arc width ($W$) of the QR code should not exceed one-quarter of the cylinder circumference: $$W le rac{pi imes D}{4} approx 0.785 imes D$$ where $D$ is the outer diameter of the cylinder.For example, on a beverage can with a diameter of 66 mm: $$W_{ ext{max}} le rac{3.14159 imes 66}{4} approx 51.8 ext{ mm}$$ Adhering to this limit ensures that the perspective distortion angle across the outer finder patterns stays below 45 degrees.
