Take photos with "portrait" mode (bokeh) in iOS 11 / iPhone 7/8plus in 3rd-party app?

Viewed 574

The iPhone 7 plus and 8 plus (and X) have an effect in the native camera app called "Portrait mode", which simulates a bokeh-like effect by using depth data to blur the background.

I want to add the capability to take photos with this effect in my own app.

I can see that in iOS 11, depth data is available. But I have no idea how to use this to achieve the effect.

Am I missing something -- is it possible to turn on this effect somewhere and just get the image with it applied, rather than having to try and make this complicated algorithm myself?

cheers

1 Answers
Related