FaceRecognitionUtilities
public class FaceRecognitionUtilities
Face recognition utilities
Since
2.6.0-
Create faces suitable for face recognition from given faces in an image
Since
2.6.0Declaration
Swift
public func createRecognizableFacesFromFaces(_ faces: [Face], in image: ImageProvider, faceTemplateVersions: [VerIDFaceTemplateVersion] = VerIDFaceTemplateVersion.all, completion: @escaping (Result<[RecognizableFace], Error>) -> Void)
Parameters
faces
Faces to make recognizable
image
Image in which the faces were detected
faceTemplateVersions
Versions of the face templates to create
completion
Completion callback
-
Compare faces in two images
Detect a single face in each supplied image and output the detected faces and the comparison score between them
Since
2.6.0Declaration
Swift
public func compareFaceInImage(_ image1: ImageProvider, toFaceInImage image2: ImageProvider, using faceTemplateVersion: VerIDFaceTemplateVersion? = nil, completion: @escaping (Result<(RecognizableFace, RecognizableFace, Float), Error>) -> Void)
Parameters
image1
First image to compare
image2
Second image to compare
faceTemplateVersion
Face template version to use for the comparison or
nil
. Ifnil
defaults to the default face template version set in face recognitioncompletion
Completion callback
-
Identify users in an image
Since
2.6.0Declaration
Swift
public func identifyUsersInImage(_ image: ImageProvider, limit: Int, completion: @escaping (Result<[UserIdentificationResult], Error>) -> Void)
Parameters
image
Image in which to identify users
limit
Maximum number of faces to detect
completion
Completion callback