Sometimes, we try to capture a QR code with a good digital camera on a smartphone, but the reading eventually fails. This usually happens when the QR code itself is of poor image quality, or if it has been printed on surfaces that are not flat—deformed or with irregularities of unknown pattern—such as the wrapping of a courier package or a tray of prepared food.