Facematch & Liveness

Accura Scan face biometrics solution matches the selfie image with the image on the id card and also confirms if the user was live or not during the process.

Facematch

The method use to Start Facematch is

accura.startFaceMatch(accuraConfs, config, function (result), function (error));

Parameters:

accuraConfs: JSON Object

  • enableLogs: Boolean

  • with_face: Boolean

  • face_uri: URI

config: JSON Object

  • feedbackTextSize: integer

  • feedBackframeMessage: String

  • feedBackAwayMessage: String

  • feedBackOpenEyesMessage: String

  • feedBackCloserMessage: String

  • feedBackCenterMessage: String

  • feedBackMultipleFaceMessage: String

  • feedBackHeadStraightMessage: String

  • feedBackBlurFaceMessage: String

  • feedBackGlareFaceMessage: String

  • setBlurPercentage: integer

  • setGlarePercentage_0: integer

  • setGlarePercentage_1: integer

Response:

Success: JSON Response {with_face: Boolean,status: Boolean,detect: URI? (when with_face = true),img_1: URI? (when with_face = false),img_2: URI? (when with_face = false),score: Float} Error: String

Example function:

function startFaceMatch() {

     var accuraConfs = {with_face: true, face_uri: facematchURI};
     var config = {
         feedbackTextSize: 18,
         feedBackframeMessage: 'Frame Your Face',
         feedBackAwayMessage: 'Move Phone Away',
         feedBackOpenEyesMessage: 'Keep Your Eyes Open',
         feedBackCloserMessage: 'Move Phone Closer',
         feedBackCenterMessage: 'Move Phone Center',
         feedBackMultipleFaceMessage: 'Multiple Face Detected',
         feedBackHeadStraightMessage: 'Keep Your Head Straight',
         feedBackBlurFaceMessage: 'Blur Detected Over Face',
         feedBackGlareFaceMessage: 'Glare Detected',
         // <!--// 0 for clean face and 100 for Blurry face or set it -1 to remove blur filter-->
         setBlurPercentage: 80,
         // <!--// Set min percentage for glare or set it -1 to remove glare filter-->
         setGlarePercentage_0: -1,
         setGlarePercentage_1: -1,
     };
     accura.startFaceMatch(accuraConfs, config, function (result) {
           //Result from the SDK
     }, function (error) {
          alert(error);
     });
}

Liveness

The method use to Start Liveness is

accura.startLiveness(accuraConfs, config, function (result), function (error));

Parameters:

accuraConfs: JSON Object

  • enableLogs: Boolean

  • with_face: Boolean

  • face_uri: 'uri of face'

config: JSON Object

  • feedbackTextSize: integer

  • feedBackframeMessage: String

  • feedBackAwayMessage: String

  • feedBackOpenEyesMessage: String

  • feedBackCloserMessage: String

  • feedBackCenterMessage: String

  • feedBackMultipleFaceMessage: String

  • feedBackHeadStraightMessage: String

  • feedBackBlurFaceMessage: String

  • feedBackGlareFaceMessage: String

  • setBlurPercentage: integer

  • setGlarePercentage_0: integer

  • setGlarePercentage_1: integer

  • isSaveImage: Boolean

  • liveness_url: URL (Require)

  • contentType: String

  • feedBackLowLightMessage: String

  • feedbackLowLightTolerence: integer,

  • feedBackStartMessage: String

  • feedBackLookLeftMessage: String

  • feedBackLookRightMessage: String

  • feedBackOralInfoMessage: String

  • enableOralVerification: Boolean,

  • codeTextColor: String

Response:

Success: JSON Response {with_face: Boolean, status: Boolean, detect: URI?, image_uri: URI?, fm_score: Float?, score: Float} Error: String

Example function:

function startLiveness() {
     var accuraConfs = {with_face: true, face_uri: facematchURI};
     var config = {
         feedbackTextSize: 18,
         feedBackframeMessage: 'Frame Your Face',
         feedBackAwayMessage: 'Move Phone Away',
         feedBackOpenEyesMessage: 'Keep Your Eyes Open',
         feedBackCloserMessage: 'Move Phone Closer',
         feedBackCenterMessage: 'Move Phone Center',
         feedBackMultipleFaceMessage: 'Multiple Face Detected',
         feedBackHeadStraightMessage: 'Keep Your Head Straight',
         feedBackBlurFaceMessage: 'Blur Detected Over Face',
         feedBackGlareFaceMessage: 'Glare Detected',
         // <!--// 0 for clean face and 100 for Blurry face or set it -1 to remove blur filter-->
         setBlurPercentage: 80,
         // <!--// Set min percentage for glare or set it -1 to remove glare filter-->
         setGlarePercentage_0: -1,
         // <!--// Set max percentage for glare or set it -1 to remove glare filter-->
         setGlarePercentage_1: -1,
         liveness_url: '<your liveness url>',
         contentType: 'form_data',
         feedBackLowLightMessage: 'Low light detected',
     };
     accura.startLiveness(accuraConfs, config, function (result) {
           //Result from the SDK
     }, function (error) {
          alert(error);
     });
}

Last updated