API Reference
setActivation
Name
setActivation
Description
Activate SDK
Input
var0 (String): The license string
Output
The SDK activation status code.
0: Success
Non-zero: Activation failed
init
Name
init
Description
Initiate SDK
Input
var0 (AssetManager): An instance of AssetManager used to access application assets
Output
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
yuv2Bitmap
Name
yuv2Bitmap
Description
Convert YUV camera frame to Bitmap image
Input
nv21 (byte[]): Byte array representing the YUV image data in NV21 format
width (int): Width of the image
height (int): Height of the image
orientation (int): Orientation of the image
1 -> No processing 2 -> Flip horizontally 3 -> Flip horizontally first and then flip vertically 4 -> Vertical flip 5 -> Transpose 6 -> Rotate 90° clockwise 7 -> Horizontal and vertical flip --> Transpose 8 -> Rotate 90° counterclockwise
Output
A Bitmap object representing the converted image
faceDetection
Name
faceDetection
Description
Detect Face
Input
var0 (Bitmap): The Bitmap image
Output
FaceDetectionParam
FaceBox
The liveness score ranges from 0.0 to 1.0 Default Liveness Threshold is 0.7
templateExtraction
Name
templateExtraction
Description
Extract face feature
Input
var0 (Bitmap): The Bitmap image
Output
A byte array representing the extracted template from the face
similarityCalculation
Name
similarityCalculation
Description
Calculate similarity between two face features
Input
var0 (byte[]): The byte array representing the first face template
var1 (byte[]): The byte array representing the second face template
Output
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