iOS 15: Apple puts an end to fuzzy QR code scans

0
620

With iOS 15, Apple is for the first time revealing the minimum focus distance of certain iPhone models for developers. This can be helpful, for example, when scanning QR codes, where users often have to struggle with an initially blurred image.

Below the minimum focus distance is the minimum distance between To understand the lens and the photographed object up to which the camera can focus using autofocus or manual focus. If this distance is not reached, only a blurry image can be seen in the viewfinder. Apple had not previously made this property of the iPhone cameras public, but this will change with iOS 15.

With the new “.minimumFocusDistance” property, this feature is made available to developers so that they can adapt their apps accordingly. An example: If you want to scan a rather small QR code on the bike with a bike sharing app, it can happen that the minimum focus distance is undershot if the QR code has to fill in the viewfinder within the app for a successful scan. So far, these smartphone limitations have not been public either to the user or to the app developer. For the latter group, Apple offers a solution with iOS 15 and the disclosure of the camera properties, which should also automatically eliminate the problem on the user side.

iPhone 12 needs a larger minimum focus distance

The following table shows the restrictions of selected iPhones. The iPhone X, for example, can focus up to 10 cm with the main camera, while the iPhone XS Max can only focus up to 12 cm and the iPhone 12 Pro Max only up to 15 cm. The iPhone 12 Pro Max is also slightly at a disadvantage when it comes to telephoto with higher magnification.

Minimum focus distance of iPhone X, XS Max, 12 Pro and 12 Pro Max (Image: Apple)

In an application example from Apple shown at WWDC 2021, an attempt is made to scan a 2 cm wide QR code with an iPhone 12 Pro Max. So that the code appears in the viewfinder in full format and can be scanned, the smartphone must be positioned comparatively close above it. However, due to the minimal focus distance, it is then no longer possible to get a sharp picture.

Image 1 of 2

< figure> Blurred image with a small QR code
Sharp image with a small QR code

App determines zoom level automatically

As a solution, the smartphone could, for example, be held further away and the QR code could then be digitally zoomed manually by the user in order to capture it in full format. With the new “.minimumFocusDistance” property, developers can automate this step. Via the horizontal field of view of the camera, which can be called up using “deviceFieldOfView”; the minimum QR code size to be captured; as well as the width of the camera viewfinder to be filled in percent, it can be calculated how large the minimum distance to the object must be in order to fill the viewfinder. In conjunction with the now public minimum focus distance, the correct zoom level can be preset for the respective iPhone so that the problem mentioned at the beginning is less likely to arise. The following developer video from Apple shows how the problem and the new solution play out in practice.