设置Google Mobile Vision面部检测器的方向

时间:2018-01-07 17:35:14

标签: ios google-api swift4 google-vision

我尝试让Google Mobile Vision检测来自实时相机Feed的脸部。由于我正在处理帧,我需要设置方向。 Google Docs说...

  

人脸检测器要求图像及其中的面部处于直立方向。如果需要旋转图像,请使用GMVDetectorImageOrientation键在字典选项中传入方向信息。探测器将根据方向值为您旋转图像。

如何获取图像方向,然后将其传递给密钥?

我的选项词典......

        let options = [GMVDetectorFaceLandmarkType: GMVDetectorFaceLandmark.all.rawValue, GMVDetectorFaceClassificationType: GMVDetectorFaceClassification.all.rawValue, GMVDetectorFaceTrackingEnabled: true] as [String : Any]

0 个答案:

没有答案