RxVerID
public class RxVerID
Reactive implementation of common Ver-ID tasks
-
Initializer
Since
1.0.0Declaration
Swift
public init() -
Initializer
Since
1.3.0Declaration
Swift
@available(iOS 10.3, *) public convenience init(veridPassword: String)Parameters
veridPasswordPassword to unlock P12 identity file
-
Initializer
Since
1.5.0Declaration
Swift
@available(iOS 10.3, *) public convenience init(identity: VerIDIdentity)Parameters
identityVer-ID SDK identity
-
Create Ver-ID instance
Since
1.0.0Declaration
Swift
public var verid: Single<VerID> { get } -
Face detection factory
Since
1.0.0Declaration
Swift
public var faceDetectionFactory: FaceDetectionFactory { get set } -
Face recognition factory
Since
1.0.0Declaration
Swift
public var faceRecognitionFactory: FaceRecognitionFactory { get set } -
User management factory
Since
1.0.0Declaration
Swift
public var userManagementFactory: UserManagementFactory { get set }
-
Create VerIDImage from an image from the given URL
Since
1.0.0Declaration
Swift
public func veridImageFromURL(_ url: URL) -> Single<VerIDImage>Parameters
urlImage URL
Return Value
Ver-ID image
-
Detect faces in image URL
Since
1.0.0Declaration
Swift
public func detectFacesInImageURL(_ url: URL, limit: Int) -> Observable<Face>Parameters
urlImage URL
limitMaximum number of faces to detect
Return Value
Observable whose elements are faces
-
Detect faces in Ver-ID image
Since
1.0.0Declaration
Swift
public func detectFacesInImage(_ image: VerIDImage, limit: Int) -> Observable<Face>Parameters
imageImage
limitMaximum number of faces to detect
Return Value
Observable whose elements are faces
-
Detect faces that can be used for face recognition in image URL
Since
1.0.0Declaration
Swift
public func detectRecognizableFacesInImageURL(_ url: URL, limit: Int) -> Observable<RecognizableFace>Parameters
urlImage URL
limitMaximum number of faces to detect
Return Value
Observable whose elements are faces that can be used for face recognition
-
Detect faces that can be used for face recognition in Ver-ID image
Since
1.0.0Declaration
Swift
public func detectRecognizableFacesInImage(_ image: VerIDImage, limit: Int) -> Observable<RecognizableFace>Parameters
imageImage
limitMaximum number of faces to detect
Return Value
Observable whose elements are faces that can be used for face recognition
-
Create face that can be used for face recognition from a detected face and Ver-ID image
Since
1.0.0Declaration
Swift
public func createRecognizableFaceFromFace(_ face: Face, image: VerIDImage) -> Observable<RecognizableFace>Parameters
faceDetected face
imageImage
Return Value
Observable whose elements are faces that can be used for face recognition
-
Identify users in image URL
Since
1.0.0Declaration
Swift
public func identifyUsersInImageURL(_ url: URL) -> Observable<(String, Float)>Parameters
urlImage URL
Return Value
Observable whose elements are tuples of user ID and similarity score
-
Identify users in Ver-ID image
Since
1.0.0Declaration
Swift
public func identifyUsersInImage(_ image: VerIDImage) -> Observable<(String, Float)>Parameters
imageImage
Return Value
Observable whose elements are tuples of user ID and similarity score
-
Identify users in face
Since
1.0.0Declaration
Swift
public func identifyUsersInFace(_ face: Recognizable) -> Observable<(String, Float)>Parameters
faceFace
Return Value
Observable whose elements are tuples of user ID and similarity score
-
Crop image to the bounds of a detected face
Since
1.0.0Declaration
Swift
public func cropImageURL(_ url: URL, toFace face: Face) -> Single<UIImage>Parameters
urlImage URL
faceFace whose bounds to use for cropping the image
Return Value
Single whose value is a UIImage cropped to the bounds of the face
-
Compare face to other faces
Note
Comparisons with scores above VerID.faceRecognition.authenticationScoreThreshold can be considered similar enough to pass authenticationSince
1.0.0Declaration
Swift
public func compareFace(_ face: Recognizable, toFaces faces: [Recognizable]) -> Single<Float>Parameters
faceFace to compare to other faces
facesOther faces to compare to the face
Return Value
Single whose value is a face comparison score
-
Assign faces to user
Since
1.0.0Declaration
Swift
public func assignFaces(_ faces: [Recognizable], toUser user: String) -> CompletableParameters
facesFaces
userUser ID
-
Assign face to user
Since
1.0.0Declaration
Swift
public func assignFace(_ face: Recognizable, toUser user: String) -> CompletableParameters
faceFace
userUser ID
-
Delete user
Since
1.0.0Declaration
Swift
public func deleteUser(_ user: String) -> CompletableParameters
userIdentifier of the user to delete
-
Get users
Since
1.0.0Declaration
Swift
public var users: Observable<String> { get }Return Value
Observable whose elements are identifiers of users with assigned faces
-
Get faces of user
Since
1.0.0Declaration
Swift
public func facesOfUser(_ user: String) -> Observable<Recognizable>Parameters
userIdentifier for the user
Return Value
Observable whose elements are faces of the user
-
Authenticate user in faces
Since
1.0.0Declaration
Swift
public func authenticateUser(_ user: String, inFaces faces: [Recognizable]) -> Single<Bool>Parameters
userIdentifier for the user to be authenticated
facesFaces to use for authentication
Return Value
Single whose value is a boolean (
trueif the user is authenticated) -
Authenticate user in face
Since
1.0.0Declaration
Swift
public func authenticateUser(_ user: String, inFace face: Recognizable) -> Single<Bool>Parameters
userIdentifier for the user to be authenticated
faceFace to use for authentication
Return Value
Single whose value is a boolean (
trueif the user is authenticated) -
Authenticate user in image
Since
1.0.0Declaration
Swift
public func authenticateUser(_ user: String, inImageURL url: URL) -> Single<Bool>Parameters
userIdentifier for the user to be authenticated
urlImage URL in which to find the face to use for authentication
Return Value
Single whose value is a boolean (
trueif the user is authenticated) -
Authenticate user in image
Since
1.0.0Declaration
Swift
public func authenticateUser(_ user: String, inImage image: VerIDImage) -> Single<Bool>Parameters
userIdentifier for the user to be authenticated
imageImage in which to find the face to use for authentication
Return Value
Single whose value is a boolean (
trueif the user is authenticated)
-
Get image URLs from session result
Since
1.0.0Declaration
Swift
public func imageURLsFromSessionResult(_ sessionResult: VerIDSessionResult, bearing: Bearing? = nil) -> Observable<URL>Parameters
sessionResultSession result
bearingOptional face bearing by which to filter the images
Return Value
Observable whose elements are URLs of images collected in the session
-
Get images from session result
Since
1.0.0Declaration
Swift
public func imagesFromSessionResult(_ sessionResult: VerIDSessionResult, bearing: Bearing? = nil) -> Observable<UIImage>Parameters
sessionResultSession result
bearingOptional face bearing by which to filter the images
Return Value
Observable whose elements are images collected in the session
-
Get images from session result and crop them to their corresponding faces
Since
1.0.0Declaration
Swift
public func croppedFaceImagesFromSessionResult(_ sessionResult: VerIDSessionResult, bearing: Bearing? = nil) -> Observable<UIImage>Parameters
sessionResultSession result
bearingOptional face bearing by which to filter the images
Return Value
Observable whose elements are images collected in the session cropped to their corresponding faces
-
Get faces from session result
Since
1.0.0Declaration
Swift
public func facesFromSessionResult(_ sessionResult: VerIDSessionResult, bearing: Bearing? = nil) -> Observable<Face>Parameters
sessionResultSession result
bearingOptional face bearing by which to filter the faces
Return Value
Observable whose elements are faces collected in the session
-
Get faces that can be used for face recognition from session result
Since
1.0.0Declaration
Swift
public func recognizableFacesFromSessionResult(_ sessionResult: VerIDSessionResult, bearing: Bearing? = nil) -> Observable<RecognizableFace>Parameters
sessionResultSession result
bearingOptional face bearing by which to filter the faces
Return Value
Observable whose elements are recognizable faces collected in the session
-
Get faces and images from session result
Since
1.0.0Declaration
Swift
public func facesAndImagesFromSessionResult(_ sessionResult: VerIDSessionResult, bearing: Bearing? = nil) -> Observable<(Face, URL, Bearing)>Parameters
sessionResultSession result
bearingOptional face bearing by which to filter the elements
Return Value
Observable whose elements are triplets of face, URL and bearing
-
Get recognizable faces and images from session result
Since
1.0.0Declaration
Swift
public func recognizableFacesAndImagesFromSessionResult(_ sessionResult: VerIDSessionResult, bearing: Bearing? = nil) -> Observable<(RecognizableFace, URL, Bearing)>Parameters
sessionResultSession result
bearingOptional face bearing by which to filter the elements
Return Value
Observable whose elements are triplets of recognizable face, URL and bearing
-
Get recognizable faces and images cropped to the bounding boxes of faces from session result
Since
1.2.0Declaration
Swift
public func recognizableFacesAndCroppedFaceImagesFromSessionResult(_ sessionResult: VerIDSessionResult, bearing: Bearing? = nil) -> Observable<(RecognizableFace, UIImage, Bearing)>Parameters
sessionResultSession result
bearingOptional face bearing by which to filter the elements
Return Value
Observable whose elements are triplets of recognizable face, image and bearing
-
Create and run a Ver-ID session
Note
If the session is cancelled the maybe completes without a value. If the session fails the maybe returns an error.Since
1.0.0Declaration
Swift
func session<T>(settings: T) -> Maybe<VerIDSessionResult> where T : VerIDSessionSettingsParameters
settingsVer-ID session settings
Return Value
Maybe whose value is a session result if the session completes successfully
-
Create and run a Ver-ID session
Note
If the session is cancelled the maybe completes without a value. If the session fails the maybe returns an error.Since
1.1.0Declaration
Swift
func session<T>(settings: T, translatedStrings: TranslatedStrings) -> Maybe<VerIDSessionResult> where T : VerIDSessionSettingsParameters
settingsVer-ID session settings
translatedStringsTranslations
Return Value
Maybe whose value is a session result if the session completes successfully
-
Run a Ver-ID session
Since
1.4.0Declaration
Swift
func runSession(_ session: VerIDSession) -> Maybe<VerIDSessionResult>Parameters
sessionSession to run
-
Create a Ver-ID session
Since
1.4.0Declaration
Swift
func createSession<T>(settings: T) -> Single<VerIDSession> where T : VerIDSessionSettingsParameters
settingsSession settings
-
Create a Ver-ID session
Since
1.4.0Declaration
Swift
func createSession<T>(settings: T, translatedStrings: TranslatedStrings) -> Single<VerIDSession> where T : VerIDSessionSettingsParameters
settingsSession settings
translatedStringsTranslations
-
Set video writer service factory on session
Since
1.4.0Declaration
Swift
func setVideoWriterFactory(_ videoWriterFactory: VideoWriterServiceFactory, on session: VerIDSession) -> Single<VerIDSession>Parameters
videoWriterFactoryVideo writer service factory
sessionSession
-
Set face detection service factory on session
Since
1.4.0Declaration
Swift
func setFaceDetectionFactory(_ faceDetectionFactory: FaceDetectionServiceFactory, on session: VerIDSession) -> Single<VerIDSession>Parameters
faceDetectionFactoryFace detection service factory
sessionSession
-
Set result evaluation service factory on session
Since
1.4.0Declaration
Swift
func setResultEvaluationFactory(_ resultEvaluationFactory: ResultEvaluationServiceFactory, on session: VerIDSession) -> Single<VerIDSession>Parameters
resultEvaluationFactoryResult evaluation service factory
sessionSession
-
Set image writer service factory on session
Since
1.4.0Declaration
Swift
func setImageWriterFactory(_ imageWriterFactory: ImageWriterServiceFactory, on session: VerIDSession) -> Single<VerIDSession>Parameters
resultEvaluationFactoryImage writer service factory
sessionSession
-
Set session view controllers factory on session
Since
1.4.0Declaration
Swift
func setSessionViewControllersFactory(_ sessionViewControllersFactory: SessionViewControllersFactory, on session: VerIDSession) -> Single<VerIDSession>Parameters
resultEvaluationFactorySession view controllers factory
sessionSession
RxVerID Class Reference