项目中用到了人脸识别,目前工作是需要从摄像头中拿数据传入到人脸算法中。
现在数据我通过AVFoundation中的代理方法拿到了原始数据sampleBuffer。
- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection
{
}
我如何从原始数据sampleBuffer中将数据转成算法能接收的灰度图像数据?
Among them, 480 and 640 are the width and height of the incoming face recognition algorithm, which depends on the algorithm requirements
I also encountered this method, please give me some guidance.