从 faceDetector 获取视觉点后如何映射 2D 视觉点数组以创建人脸图?
faceDetector.process(visionImage) { features, error in
guard error == nil, let features = features, !features.isEmpty else {
return
}
for face in faces {
let frame = face.frame
if let leftEyeContour = face.contour(ofType: .leftEye) {
// 2D vision Points array
let leftEyePoints = leftEyeContour.points
}
if let upperLipBottomContour = face.contour(ofType: .upperLipBottom) {
let upperLipBottomPoints = upperLipBottomContour.points
}
}
}