Face Recognition Android SDK
Face recognition Android SDK with liveness detection
Code
Setup
Copy the SDK (
libfacesdkfolder) to therootfolder in your project.Add SDK to the project in
settings.gradle
Add dependency to your
build.gradle
APIs
setActivation: This API is used to activate the SDK
Input
var0 (String): The license string
Return value
The SDK activation status code.
0: Success
Non-zero: Activation failed
init: This API is used to initialize the SDK
Input
var0 (AssetManager): An instance of AssetManager used to access application assets
Return value
The SDK initialization status code.
0: Success
-1: License Key Error
-2: License AppID Error
-3: License Expired
-4: Activate Error
-5: Initialize SDK Error
faceDetection: This API is used to detect faces
Input
var0 (Bitmap): The Bitmap image
var1 (FaceDetectionParam): Parameters for face detection
Return value
A list of FaceBox objects representing the detected faces.
templateExtraction: This API is used to extract face template
Input
var0 (Bitmap): The Bitmap image
var1 (FaceBox): The bounding box of the detected face
Return value
A byte array representing the extracted template from the face
similarityCalculation: This API is used to calculate the similarity between two face templates
Input
var0 (byte[]): The byte array representing the first face template
var1 (byte[]): The byte array representing the second face template
Return value
A float value representing the similarity score between the two face templates The score ranges from 0.0 to 1.0 Default Threshold is 0.8
Last updated