1

我正在使用Google Mobile Vision来处理相机帧和检测人脸。检测到人脸后,我想将框架保存到文件中,但方向错误。

func captureOutput(_ captureOutput: AVCaptureOutput!, didOutputSampleBuffer sampleBuffer: CMSampleBuffer!, from connection: AVCaptureConnection!) {
    guard let image = GMVUtility.sampleBufferTo32RGBA(sampleBuffer) else {
        print("No Image")
        return
    }

    // wrong orientation when saving image here
}
4

0 回答 0