What Depth Control in the iPhone camera is and how it works

iPhone Depth Control lets you adjust the depth of field after you shoot, which makes it easy to apply a variably blurred background. Here’s how it works.

Adjusting depth for a photo on iPhone

Apple’s advanced dual-camera system enables portraiture photography with dynamic depth of field. Dual-lens iPhones (iPhone XS and newer models), along with the single-lens iPhone XR, let you compose photos that keep your subject sharp while creating a beautifully blurred background.

In contrast, the old iPhone 7 Plus, 8, and X models sport a relatively straightforward disc blur, which is not as sophisticated as the background blur for some truly stunning bokeh on the newer models.

About Depth Control

Modern iPhones have a feature called Depth Control, and here’s how Apple describes it:

Advanced depth segmentation in Portrait mode enables more sophisticated portraits with professional-level bokeh. New Depth Control allows users to dynamically adjust the depth of field both in real-time preview and post-capture to create portraits with a beautiful background blur. Portrait mode with Depth Control is also available on the TrueDepth camera for selfies.

Taking images with dynamic depth of field requires:

  • iPhone XS, XS Max, XR, or newer running iOS 12.1 or later
  • Stock Camera app
  • PORTRAIT shooting mode selected in the Camera app for either the front or back camera

Realtime preview

You can regulate the bokeh amount directly during photo composition. To do that, tap the little (f) icon in the upper-right corner of the Camera app, and it will reveal a hidden Depth Control slider for adjusting the simulated aperture level before taking an image.

Adjust background blur while taking a picture with iPhone Camera

Adjusting the bokeh during the preview doesn’t affect your ability to control it in the post. Like with regular Portrait photos, you can remove the effect entirely without quality or content loss.

How iPhone camera handles depth

Apple captures and saves depth data alongside your portraits, using it to deliver a simple, flat bokeh effect in software.

As iPhone camera sensors grow more sophisticated, Apple takes the bokeh to the next level with subsequent iOS updates.

iPhones are capable of capturing way more detailed segmentation masks thanks to the combination of the faster camera sensors and the power of the A-series chips with hardware-assisted machine learning on an embedded Neural engine coprocessor. Paired with an algorithmic model that simulates the characteristics of the actual iPhone camera lens, Apple’s bokeh on the latest devices spreads out light sources without blowing them out.

The end result looks much better than the standard, templatized Gaussian or disc blur.

iPhone depth control
Larger aperture=more bokeh and shallower depth of field; smaller aperture=less blur

The precise segmentation mask allows you to interact with your portrait photos in interesting new ways, thanks to the much better separation of the foreground and background layers.

Apple’s Portrait Segmentation API is also available for developers to use in their apps. Third-party camera apps like Halide are already utilizing iOS’s segmentation data through this API.

Depth Control

The Segmentation mask is what makes Depth Control possible.

Depth Control lets you adjust the intensity of the background blur after taking an image, but you can also make the bokeh effect subtler or more aggressive while shooting, with real-time preview in the viewfinder.

This is all possible because the API delivers an accurate portrait matte.

iPhone depth control - depth mapping explained

In case you’re wondering, a portrait matte is a segmentation from foreground to background. Specifically, you have a mask which is 1.0 in the foreground and 0.0 in the background and you get soft and continuous values in between. The portrait matte is of extremely high quality and is able to preserve fine details, such as curl and hair on the outline of your subject.

iPhone depth control - segmentation map example

All portraits taken with supported iPhones come with detailed segmentation masks which iOS’s computational photography algorithm uses not only to create the blur, but also improve hair and fine line detail around the edges of a portrait subject.

Using and adjusting Depth Control

After taking a picture in Portrait mode, open the Photos app, select the image, and tap Edit. Now, make sure you are in the Portrait tab, and you will see a DEPTH button. You can now dynamically adjust the intensity of the bokeh by interacting with the adjustment slider that carries f-stop or aperture measurements.

The slider ranges from f/1.4 to f/16.

f/1.4 represents the most amount of blur, and f/16 is almost no bokeh (in photography, smaller numbers represent larger apertures, and vice versa). To turn off the bokeh entirely, you can adjust the slider to the OFF position, which is next to f/16.

iPhone depth control - September 2018 event image

As you drag the depth of field slider, you’ll notice the background changes with it. Move it all the way to the left to apply more blur to the background for that nice feathered look or to the right to soften the bokeh. Depth Control isn’t possible on older iPhones (X and earlier) because of hardware constraints and the fact that their cameras couldn’t produce accurate segmentation masks.

iPhone depth control - adjusting the bokeh in the Photos app

Depth Control is available on both the front and rear cameras on iPhone XS or newer.

Portraits taken with older iPhone X and earlier won’t let you adjust the blur because the depth data that those phones capture is not accurate enough for Depth Control.

Depth Control is a great feature in Apple’s iPhone photography toolkit, that will only improve as the algorithms and machine learning get better over time. While bokeh is a visually stunning effect that looks best when taking portraits, having an adjustable depth of focus is also good for some practical purposes, such as removing unwanted objects from the background by cranking up the bokeh or adding a subject inside the blur zone to the in-focus area.

And that, our friends, is all you need to know about Depth Control in your iPhone.

On a related note: