Я использую ARkit с Vision Framework. Я обнаружил лица в [VNFaceObservation]. Но как я могу сравнить эти лица с сохраненным изображением для аутентификации пользователя.
guard let capturedImage = sceneView.session.currentFrame?.capturedImage else { return }
let image = CIImage.init(cvPixelBuffer: capturedImage)
let detectFaceRequest = VNDetectFaceRectanglesRequest { (request, error) in
DispatchQueue.main.async {
//Loop through the resulting faces and add a red UIView on top of them.
if let faces = request.results as? [VNFaceObservation] {
for face in faces {
// How to compare these faces with store image to authticate user
}
}
}
}