Accura Face Match
Face Biometrics is used for Matching Both the Source and the Target Image. It Matches the User's Selfie Image with the Image on the Document.
Step 1: Before you begin
If you haven't done already then follow Project Setup steps.
Please download the Accura Scan license and then add it to your app.
To generate your Accura Scan license contact [email protected]
Move your accuraface.license file into the module (app-level) assets folder (usually
<project>/<app-module>/src/main/assets)
Note: Make sure license file name should be accuraface.license
Permissions required:
Camera Permission
android.permission.CAMERAStorage Permission required only for print out debug logs.
Step 2 : Open Auto Capture Camera
Customize camera screen (Optional)
FMCameraScreenCustomization cameraScreenCustomization = new FMCameraScreenCustomization(); cameraScreenCustomization.backGroundColor = getResources().getColor(R.color.fm_camera_Background); cameraScreenCustomization.closeIconColor = getResources().getColor(R.color.fm_camera_CloseIcon); cameraScreenCustomization.feedbackBackGroundColor = getResources().getColor(R.color.fm_camera_feedbackBg); cameraScreenCustomization.feedbackTextColor = getResources().getColor(R.color.fm_camera_feedbackText); cameraScreenCustomization.feedbackTextSize = 18; cameraScreenCustomization.feedBackframeMessage = "Frame Your Face"; cameraScreenCustomization.feedBackAwayMessage = "Move Phone Away"; cameraScreenCustomization.feedBackOpenEyesMessage = "Keep Your Eyes Open"; cameraScreenCustomization.feedBackCloserMessage = "Move Phone Closer"; cameraScreenCustomization.feedBackCenterMessage = "Move Phone Center"; cameraScreenCustomization.feedBackMultipleFaceMessage = "Multiple Face Detected"; cameraScreenCustomization.feedBackHeadStraightMessage = "Keep Your Head Straight"; cameraScreenCustomization.feedBackBlurFaceMessage = "Blur Detected Over Face"; cameraScreenCustomization.feedBackGlareFaceMessage = "Glare Detected"; cameraScreenCustomization.feedBackLowLightMessage = "Low light detected"; cameraScreenCustomization.feedbackDialogMessage = "Loading..."; cameraScreenCustomization.feedBackProcessingMessage = "Processing..."; cameraScreenCustomization.showlogo = 0; // Set 0 to hide logo from selfie camera screen cameraScreenCustomization.logoIcon = R.drawable.your_logo; // To set your custom logo // FMCameraScreenCustomization.CAMERA_FACING_FRONT to set selfie camera // FMCameraScreenCustomization.CAMERA_FACING_BACK to set rear camera cameraScreenCustomization.facing = FMCameraScreenCustomization.CAMERA_FACING_FRONT; // 0 for full dark face and 100 for full bright face or set it -1 to remove low light filter cameraScreenCustomization.setLowLightTolerence(-1/*lowLightTolerence*/); // 0 for clean face and 100 for Blurry face or set it -1 to remove blur filter cameraScreenCustomization.setBlurPercentage(80/*blurPercentage*/); // To allow blur on face // Set min and max percentage for glare or set it -1 to remove glare filter cameraScreenCustomization.setGlarePercentage(6/*glareMinPercentage*/, 99/*glareMaxPercentage*/);Open Camera screen using android Intent.
Intent intent = SelfieFMCameraActivity.getCustomIntent(this, cameraScreenCustomization); startActivityForResult(intent, ACCURA_FACEMATCH_CAMERA);
Receive Capture Image
Step 3 : Implement face match
(Optional) Required storage permission to read image file from internal storage.
Initialize
com.inet.facelock.callback.FaceHelperin onCreate methodSet src and target image to faceHelper
Note: Make sure to call "faceHelper.setInputImage" first, followed by "faceHelper.setMatchImage".
Using a File
Using a File URI
Using Path
Using a Bitmap
Using a file URI by using one function
Using a file by using one function
Implement
com.inet.facelock.callback.FaceCallbackto your Activity and Override following methods to receive data.Received original image in Bitmap format to display on ui as per your requirement
Receive Match score of src and target Image on below override method
(Optional) Recomanded override methods for SDK
Receive Detected Face position on your src and Target Images
Last updated