How to crop a cvPixelBuffer to the bounds of a CGRect?

Viewed 120

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?

0 Answers
Related