This is How the iPhone’s Portrait Mode ‘Fakes’ Bokeh

Ever wonder how the iPhone’s amazing Portrait Model is able to create “fake” bokeh? Some Stuff Explained created this simple 5-minute explanation video that explains how Apple’s Portrait Mode works on iPhones with dual lenses.

The feature is made possible by the dual lenses found on the back of the phone (Google’s portrait mode uses dual pixels behind a single lens). Portrait mode creates “fake” bokeh by digitally softening the background. The two cameras create a 3D depth map of the scene using two images of the same scene shot a few millimeters apart.

These two images are analyzed to determine where pixels are on each version of the image, ultimately creating a disparity map.

In the map, the further apart each version of the image is, the closer it must be to the camera. With that in “mind,” your iPhone can then separate the background from the foreground and create the sought-after bokeh effect.

Discussion