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:Default
to just look for a face in front of the camera.LivenessSmile
looks for a proof of life by detecting the user smiling.LivenessHeadMovement
looks 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:FaceAcquired
Error
data (XMobbScanFaceAcquisitionData)
ifresult
isFaceAcquired
it contains a collection (usually sized one) of images.error (XMobbScanAPIError)
ifresult
isError
, 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:Valid
NotValid
NotChecked
data XMobbScanValidationResultData
contains some extra info about the validation:validationType (XMobbScanValidationType)
eitherFace
orVideoRecording
(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 thestate
field.
error (XMobbScanAPIError)
ifresult
isError
, this parameter will contain some info about the issue. Please, visit Error Handling section for further detail.