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 for Facematch

AccurascanKyc.startFaceMatch(passArgs, function (error, success));

Parameter:

passArgs: [accuraConfs, config]

  • accuraConfs: JSON Object

    • face_uri: URI

  • config: JSON Object

    • backGroundColor: Hex code

    • closeIconColor: Hex code

    • feedbackBackGroundColor: Hex code

    • feedbackTextColor: Hex code

    • setFeedbackTextSize: Integer

    • setFeedBackframeMessage: String

    • setFeedBackAwayMessage: String

    • setFeedBackOpenEyesMessage: String

    • setFeedBackCloserMessage: String

    • setFeedBackCenterMessage: String

    • setFeedbackMultipleFaceMessage: String

    • setFeedBackFaceSteadymessage: String

    • setFeedBackLowLightMessage: String

    • setFeedBackBlurFaceMessage: String

    • setFeedBackGlareFaceMessage: String

    • setBlurPercentage: Integer

    • setGlarePercentage_0: Integer

    • setGlarePercentage_1: Integer

    • feedbackDialogMessage: String

    • feedBackProcessingMessage: String

    • isShowLogo: Integer(0 or 1)

Response:

Success: JSON Response Error: String

Example Function:

onPressFaceMatch = () => {
 var accuraConfs = {
   face_uri: this.facematchURI,
 };
 var fconfig = {
   backGroundColor: '#FFC4C4C5',
   closeIconColor: '#FF000000',
   feedbackBackGroundColor: '#FFC4C4C5',
   feedbackTextColor: '#FF000000',
   setFeedbackTextSize: 18,
   setFeedBackframeMessage: 'Frame Your Face',
   setFeedBackAwayMessage: 'Move Phone Away',
   setFeedBackOpenEyesMessage: 'Keep Your Eyes Open',
   setFeedBackCloserMessage: 'Move Phone Closer',
   setFeedBackCenterMessage: 'Move Phone Center',
   setFeedbackMultipleFaceMessage: 'Multiple Face Detected',
   setFeedBackFaceSteadymessage: 'Keep Your Head Straight',
   setFeedBackLowLightMessage: 'Low light detected',
   setFeedBackBlurFaceMessage: 'Blur Detected Over Face',
   setFeedBackGlareFaceMessage: 'Glare Detected',
   setBlurPercentage: 80,
   setGlarePercentage_0: -1,
   setGlarePercentage_1: -1,
   feedbackDialogMessage: 'Loading...',
   feedBackProcessingMessage: 'Processing...',
   isShowLogo: 1,
 };
 let passArgs = [accuraConfs, fconfig];

 AccurascanKyc.startFaceMatch(passArgs, (error, response) => {
   if (error != null) {
     console.log(error);
   } else {
     console.log('Success!', response);
   }
 });
};

Liveness

The method use for Liveness

AccurascanKyc.startLiveness(passArgs, function (error, success));

Parameters:

passArgs: [accuraConfs, config]

  • accuraConfs: JSON Object

    • face_uri: 'uri of face'

  • config: JSON Object

    • backGroundColor: Hex code

    • closeIconColor: Hex code

    • feedbackBackGroundColor: Hex code

    • feedbackTextColor: Hex code

    • setFeedbackTextSize: Integer

    • setFeedBackframeMessage: String

    • setFeedBackAwayMessage: String

    • setFeedBackOpenEyesMessage: String

    • setFeedBackCloserMessage: String

    • setFeedBackCenterMessage: String

    • setFeedbackMultipleFaceMessage: String

    • setFeedBackFaceSteadymessage: String

    • setFeedBackBlurFaceMessage: String

    • setFeedBackGlareFaceMessage: String

    • setBlurPercentage: Integer

    • setGlarePercentage_0: Integer

    • setGlarePercentage_1: Integer

    • setLivenessURL: 'Your URL',

    • setFeedBackLowLightMessage: String

    • feedbackLowLightTolerence: Integer

    • feedbackDialogMessage: String

    • feedBackProcessingMessage: String

    • isShowLogo: Integer(0 or 1),

Response:

Success: JSON Response Error: String

Example Function:

onPressStartLiveness = () => {
 var accuraConfs = {
   face_uri: this.facematchURI,
 };

 var lconfig = {
   backGroundColor: '#FFC4C4C5',
   closeIconColor: '#FF000000',
   feedbackBackGroundColor: '#FFC4C4C5',
   feedbackTextColor: '#FF000000',
   setFeedbackTextSize: 18,
   setFeedBackframeMessage: 'Frame Your Face',
   setFeedBackAwayMessage: 'Move Phone Away',
   setFeedBackOpenEyesMessage: 'Keep Your Eyes Open',
   setFeedBackCloserMessage: 'Move Phone Closer',
   setFeedBackCenterMessage: 'Move Phone Center',
   setFeedbackMultipleFaceMessage: 'Multiple Face Detected',
   setFeedBackFaceSteadymessage: 'Keep Your Head Straight',
   setFeedBackBlurFaceMessage: 'Blur Detected Over Face',
   setFeedBackGlareFaceMessage: 'Glare Detected',
   setBlurPercentage: 80,
   setGlarePercentage_0: -1,
   setGlarePercentage_1: -1,
   setLivenessURL: 'Your URL',
   setFeedBackLowLightMessage: 'Low light detected',
   feedbackLowLightTolerence: 39,
   feedbackDialogMessage: 'Loading...',
   feedBackProcessingMessage: 'Processing...',
   isShowLogo: 1,
 };

 let passArgs = [accuraConfs, lconfig];

 AccurascanKyc.startLiveness(passArgs, (error, response) => {
   if (error != null) {
     console.log(error);
   } else {
     console.log('Success!', response);
   }
 });
};

Last updated