In this iOS video depth maps tutorial, you’ll harness iOS 13’s video depth maps to apply realtime video filters and create a special effects masterpiece!
Hi, trying to run the final version on Iphone 11 ios13.1.1, the
AVCaptureDevice.default(.builtInDualCamera - throws error, can not get the AVCaptureDevice with that camera.
When changed to builtInWideAngleCamera, the app runs, but no depth can be achieved, only original image.
Hi Owen, thanks for your quick reply.
It is fixed. It turns out on iPhone 11 there’s only a .builtInDualWideCamera - as a default set of cameras for Depth. Hope this answer might help somebody in the future.
As a side note: using the front facing camera with Xcode 11.2 and swift 5, the following code will work.
guard let camera = AVCaptureDevice.default(AVCaptureDevice.DeviceType.builtInTrueDepthCamera, for: AVMediaType.video, position: AVCaptureDevice.Position.front) else {