Now I run AVDepthPhotoFilter
that Rendering Depth Deta from a stereo camera of iPhone7Plus.
So, I want to access per-pixel depth data, but, I don’t know how to do it. Please advice.
Now I run AVDepthPhotoFilter
that Rendering Depth Deta from a stereo camera of iPhone7Plus.
So, I want to access per-pixel depth data, but, I don’t know how to do it. Please advice.
Copyright © 2021 Jogjafile Inc.
How to get DepthData and analysis CVPixelBuffer data
You need to make sure your AVCapturePhotoSettings() has isDepthDataDeliveryEnabled = true
You have to use the function func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?)
If you want more informations about CVPixelBuffer analysis, here is a useful post -> details