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

accuraService.StartFaceMatch(accuraConfs, config, appOriantation, new AccuraScanResultCallBack());

Parameter:

  • 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

  • Orientation: String (Default portrait)

Response:

Success: JSON Response Error: String

Example Function:

public partial class MainPage : ContentPage
{
    public MainPage()
    {
        JObject accuraConfigObj = JObject.Parse(@"{
            'enableLogs' : false,
            'with_face' : true,
            'face_uri' : 'your face uri'
        }");
        JObject configObj = JObject.Parse(@"{
            'feedbackTextSize' : 18,
            'feedBackframeMessage' : 'Frame Your Face',
            'feedBackLowLightMessage' : 'Low light detected',
            'feedBackStartMessage' : 'Put your face inside the oval',
            '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',
            'feedBackProcessingMessage' : 'Processing...',
            'setBlurPercentage' : 99,
            'setGlarePercentage_0' : -1,
            'setGlarePercentage_1' : -1,
            'isShowLogo' : true
        }");
        accuraService.StartFaceMatch(accuraConfigObj.ToString(), configObj.ToString(), appOriantation, new AccuraScanResultCallBack());
    }
}
public class AccuraScanResultCallBack : AccuraServiceCallBack {
    public void InvokeResult(string error, string result) {
        if (error != null) {
            // Error block.
        }
        else {
            // Result from the SDK
        }
    }
}

Liveness

The method use to start Liveness

accuraService.StartLiveness(accuraConfs, config, appOriantation, new AccuraScanResultCallBack());

Parameter:

  • 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

    • isSaveImage: Boolean

    • liveness_url: URL (Require)

    • contentType: String

    • feedBackLowLightMessage: String

    • feedbackLowLightTolerence: integer,

    • feedBackStartMessage: String

    • feedBackLookLeftMessage: String

    • feedBackLookRightMessage: String

    • feedBackOralInfoMessage: String

    • enableOralVerification: Boolean,

    • codeTextColor: String

  • Orientation: String (Default portrait)

Response:

Success: JSON Response Error: String

Example Function:

public partial class MainPage : ContentPage
{
    public MainPage()
    {
        JObject accuraConfigObj = JObject.Parse(@"{
            'enableLogs' : false,
            'with_face' : false,
            'face_uri' : 'your face uri'}");
        JObject configObj = JObject.Parse(@"{
            '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',
            'setBlurPercentage' : 99,
            'setGlarePercentage_0' : -1,
            'setGlarePercentage_1' : -1,
            'isSaveImage' : true,
            'liveness_url' : 'your liveness url',
            'contentType' : 'form_data',
            'feedBackLowLightMessage' : 'Low light detected',
            'feedbackLowLightTolerence' : 39,
            'feedBackStartMessage' : 'Put your face inside the oval',
            'feedBackLookLeftMessage' : 'Look over your left shoulder',
            'feedBackLookRightMessage' : 'Look over your right shoulder',
            'feedBackOralInfoMessage' : 'Say each digits out loud',
            'feedBackProcessingMessage' : 'Processing...',
            'enableOralVerification' : false,
            'codeTextColor' : 'white',
            'isShowLogo' : true
        }");
        accuraService.StartLiveness(accuraConfigObj.ToString(), configObj.ToString(), appOriantation, new AccuraScanResultCallBack());
    }
}
public class AccuraScanResultCallBack : AccuraServiceCallBack {
    public void InvokeResult(string error, string result) {
        if (error != null) {
            // Error block.
        }
        else {
            // Result from the SDK.
        }
    }
}

Last updated