Face Matching
Introduction
MobbScan is able to scan a user's face and check if it matches the photo of a scanned document. It is a step that should be performed when a document has been successfully scanned.
MobbScanAPI.ValidateFace(scanId, faceValidationMode, faceListener, validationListener);
This section covers how to perform a face matching validation.
MobbScanAPI.ValidateFace
After receiving a Completed result from the IXIdDocumentScanListener listener, the face matching step can be started by invoking the method ValidateFace
that takes the following four arguments:
scanId (string): The same unique identifier used in the scanning process.faceValidationMode (XMobbScanFaceValidationMode): The mode to perform the face capture. Possible values are:Defaultto just look for a face in front of the camera.LivenessSmilelooks for a proof of life by detecting the user smiling.LivenessHeadMovementlooks for a proof of life by requesting the user to follow a head movement. (Not yet available)
faceListener (IXFaceAcquisitionListener): This listener will be notified when the face is captured and it receives:result (XMobbScanFaceAcquisitionResult)tells whether or not the face was captured. Value can be:FaceAcquiredError
data (XMobbScanFaceAcquisitionData)ifresultisFaceAcquiredit contains a collection (usually sized one) of images.error (XMobbScanAPIError)ifresultisError, this parameter will contain some info about the issue. Please, visit Error Handling section for further detail.
validationListener (IXValidationCheckListener): Listener that is called back when the validation gets done. On the notification these arguments are supplied:state XMobbScanValidationState: whether or not the face validation succeeded. Possible values are:ValidNotValidNotChecked
data XMobbScanValidationResultDatacontains some extra info about the validation:validationType (XMobbScanValidationType)eitherFaceorVideoRecording(Not yet available)score (double)percentage of similarity between the captured face and the one extracted from the document. It can be used to establish your own threshold instead of relying on thestatefield.
error (XMobbScanAPIError)ifresultisError, this parameter will contain some info about the issue. Please, visit Error Handling section for further detail.
