I have a CVPixelBuffer of depth data obtained from an AVCapturePhoto object. I also have a CGRect that represents the bounds of a face in the photo. I want to crop the depth data to only have the data for the face left. How could I achieve this?
I have a CVPixelBuffer of depth data obtained from an AVCapturePhoto object. I also have a CGRect that represents the bounds of a face in the photo. I want to crop the depth data to only have the data for the face left. How could I achieve this?