API Reference
setActivation
+(int)setActivation:(NSString*)license;
Name
setActivation
Description
Activate SDK
Input
license (NSString*): The license string
Output
The SDK activation status code.
0: Success
Non-zero: Activation failed
initSDK
+(int)initSDK;
Name
initSDK
Description
Initiate SDK
Input
None
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
faceDetection
+(NSMutableArray*)faceDetection:(UIImage*)image;
Name
faceDetection
Description
Detect Face
Input
image (UIImage*): The input image
Output
FaceBox
@interface FaceBox : NSObject
@property (nonatomic) int x1;
@property (nonatomic) int y1;
@property (nonatomic) int x2;
@property (nonatomic) int y2;
@property (nonatomic) float liveness;
@property (nonatomic) float yaw;
@property (nonatomic) float roll;
@property (nonatomic) float pitch;
@end
The liveness score ranges from 0.0 to 1.0 Default Liveness Threshold is 0.7
templateExtraction
+(NSData*)templateExtraction:(UIImage*)image faceBox:(FaceBox*)faceBox;
Name
templateExtraction
Description
Extract face feature
Input
image (UIImage*): The input image
Output
A NSData representing the extracted template from the face
similarityCalculation
+(float)similarityCalculation:(NSData*)templates1 templates2:(NSData*)templates2;
Name
similarityCalculation
Description
Calculate similarity between two face features
Input
templates1 (NSData*): The first face template
templates2 (NSData*): 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