Apple files patent application for optimization of focus stacks
Focus stacking on smartphone cameras is not an entirely new thing. It was used on some Nokia Lumia phones, including the Lumia 1520 in 2014, to create a shallow depth-of-field effect and allow for refocusing an image after capture, similar to what the Lytro light field cameras can do.
However, now it appears Apple is also taking an interest in the technique. The company describes a method for the optimization of focus stacking in a patent application that was filed in 2015, but only published in December 2016. The patent details a method for calculating what positions the lens elements need to be in for an optimized capture process. After the lens is positioned in its first location and collects initial focus information, an algorithm calculates 'target depths' that would be required to capture all objects in the scene in focus. The camera would then capture an image at the current lens location, continuing to other focal points until all elements of the screen have been captured in focus.
In combination with ever improving smartphone processing power and potentially optimized camera hardware, this new method could help speed up the focus stacking process significantly, making it a possible default camera setting. Current options usually take at least a couple of seconds per focus stack for capturing and processing. The method could also be used for depth mapping and help improve the precision of portrait modes, such as the one implemented on the iPhone 7 Plus.