カメラ フレームの処理と顔の検出に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
}