LFLivenessDetetorManagerDelegate

LFLivenessDetectorDelegate类封装活体检测需要用到的回调代理方法。

- (void)livenessDidStartDetectionWithDetectionType:(LivefaceDetectionType)iDetectionType detectionIndex:(int)iDetectionIndex;

每个检测动作开始的回调方法。

参数 说明
iDetectionType 当前开始检测的动作类型
iDetectionIndex 当前开始检测的动作在动作序列中的位置, 从0开始

示例代码:

- (void)livenessDidStartDetectionWithDetectionType:(LivefaceDetectionType)iDetectionType detectionIndex:(int)iDetectionIndex{
    回调数据
}

- (void)livenessTimeDidPast:(double)dPast durationPerModel:(double)dDurationPerModel

每一帧数据回调一次,回调当前动作已用时间及当前动作允许的最大处理时间。

参数 说明
dPast 当前动作检测已用时间
dDurationPerModel 当前动作检测总时间

示例代码:

- (void)livenessTimeDidPast:(double)dPast durationPerModel:(double)dDurationPerModel{
    回调数据
}

- (void)livenessDidSuccessfulGetData:(NSData *)data lfImages:(NSArray *)arrLFImage lfVideoData:(NSArray *)lfVideoData;

活体检测成功回调。

参数 说明
data 回传加密后的二进制数据
arrLFImage 根据指定输出类型回传 LFImage 数组 , LFImage属性见 LFImage.h
lfVideoData 图片数组数据

示例代码:

- (void)livenessDidSuccessfulGetData:(NSData *)data lfImages:(NSArray *)arrLFImage lfVideoData:(NSData *)lfVideoData{
    回调数据
}

- (void)livenessDidFailWithErrorType:(LivefaceErrorType)iErrorType detectionType:(LivefaceDetectionType)iDetectionType detectionIndex:(int)iDetectionIndex data:(NSData *)data lfImages:(NSArray *)arrLFImage lfVideoData:(NSArray*)lfVideoData;

活体检测失败回调。

参数 说明
iErrorType 失败时的错误类型
iDetectionType 失败时的检测动作类型
iDetectionIndex 失败时的检测动作在动作序列中的位置,从0开始
data 回传加密后的二进制数据
arrLFImage 根据指定输出类型回传 LFImage 数组 , LFImage属性见 LFImage.h
lfVideoData 图片数组

示例代码:

- (void)livenessDidFailWithErrorType:(LivefaceErrorType)iErrorType detectionType:(LivefaceDetectionType)iDetectionType detectionIndex:(int)iDetectionIndex data:(NSData *)data lfImages:(NSArray *)arrLFImage lfVideoData:(NSData *)lfVideoData{
    回调数据
}

- (void)livenessDidCancelWithDetectionType:(LivefaceDetectionType)iDetectionType detectionIndex:(int)iDetectionIndex;

活体检测被取消的回调。

参数 说明
iDetectionType 检测被取消时的检测动作类型
iDetectionIndex 检测被取消时的检测动作在动作序列中的位置,从0开始

示例代码:

- (void)livenessDidCancelWithDetectionType:(LivefaceDetectionType)iDetectionType detectionIndex:(int)iDetectionIndex{
    回调数据
}

- (void)videoFrameRate:(int)rate;

/* 帧率 /

参数 说明
rate 帧率

示例代码:

- (void)videoFrameRate:(int)rate{
    回调数据
}

results matching ""

    No results matching ""