Supporting the Triple Cameras on 11 Pro

September 21, 2019 • 12:00 AM

With the recent updates to Version 3.0, HRZN gains support for iPhone 11 and iOS 13 – you can now shoot a photo with iPhone 11’s ultra wide lens to capture massive landscapes.

For those with a dual camera phone (iPhone X, XS, 7 Plus and 8 Plus), you get sharper images with the telephoto lens.

But how?

This was achieved by taking advantage of the dual camera fusion feature, where image data from both the telephoto camera and the wide angle camera are combined to get crisper details.

On the technical side, Apple’s AVFoundation framework has the following definitions of AVCaptureDevice.DeviceType

These “devices” are actually not one camera, but a matrix of cameras that work in orchestra to achieve the best possible results. The main image will come from one of the available cameras, selected by iOS based on the current zoom factor, exposure and focus. For example, when shooting with a XS at 2x zoom factor, iOS will most likely select the telephoto lens, unless the lighting is bad or the subject to focus on is too close by. The wide angle lens has better low light performance and can focus on objects much closer to the phone, and will be selected.

Once the main camera of image source is selected, image data from the other camera/cameras are fused together to compensate for the sharpness and low light areas that the main camera falls short of. Fortunately, this operation is handled by iOS and Apple’s image signal processors. As an iOS developer, all you need to do is to use the abstract camera matrix to capture photos, and iOS will handle the rest.

Why did HRZN not support this image fusing feature before Version 3.0? That’s just my poor understanding of the cameras to blame. That and I didn’t give the documentations a thorough read and just assumed things.

Read documentations, guys.