I'm trying to use TrueDepth camera depthData buffer returned by ARKit in ARFaceTrackingConfiguration mode in coordination with the video buffer for trying to extract the user's head contour.
All is working fine except for the fact that the depth data are always adding a shadow in the edges. Do you know what is the meaning of this shadow and how could I remove it ?
As an exemple here is a screenshot of what i can see when i only load the depthBuffer directly into a UIImage thru a CIImage :
let ciImage = CIImage(cvPixelBuffer: depthBuffer)
imageView.image = UIImage(ciImage: ciImage)
Retrieving data ...