You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

86 lines
2.2 KiB

#ifndef CW_NISLIVENESS_DET_SDK_H
#define CW_NISLIVENESS_DET_SDK_H
#include "CWFaceConfig.h"
#if defined (__cplusplus)
extern "C" {
#endif
/**
* 创建红外活体检测器
* 输入:
* sNirModelPath - 红外活体检测器模型文件
* srecogModelPath - 红外活体识别模型文件
* pMatrixParaDir - 匹配文件路径,只支持640*480以及480*640分辨率
* pLogPath - 要保存log的目录
* fSkinThresh - 肤色阈值,默认0.35
* pLicence - 授权码(仅用于安卓平台,PC端传NULL即可)
* 输出:
* errCode - 红外活体错误码
* 返回值:
* 红外活体句柄 - 成功返回句柄,失败返回0
*/
CW_FACE_API
void* cwCreateNirLivenessHandle(cw_nirliveness_err_t *errCode,
const char *pNirModelPath,
const char *pRecogModelPath,
const char *pPairFilePath,
const char *pLogPath,
const float skinThresh,
const char *pLicence );
/**
* 释放红外活体句柄
* 输入:
* pHandle - 红外活体句柄
* 输出:
* 无
* 返回值:
* 无
*/
CW_FACE_API
void cwReleaseNirLivenessHandle(void *pHandle);
/**
* 红外活体检测接口
* 输入:
* pHandle - 红外活体句柄
* pNirLivDetInfo - 输入的红外和可见光图片及关键点等信息
* 输出:
* pNirLivRes - 红外活体检测结果,需事先分配内存
* 返回值:
* cw_nirliveness_err_t - 错误码
*/
CW_FACE_API
cw_nirliveness_err_t cwFaceNirLivenessDet(void *pHandle, cw_nirliv_detinfo_t *pNirLivDetInfo, cw_nirliv_res_t *pNirLivRes);
/**
* 功能:判断可见光和红外活体中的最大人脸是否为活体
* 输入:
* pDetector - 检测句柄
* pNirHandle - 红外句柄
* pImgVis - 可见光图片数据
* pImgNir - 红外图片数据
* 输出:
* pNirLivRes - 存放红外活体检测结果的数组,需事先分配内存
* 返回值:
* cw_errcode_t - 成功返回CW_SDKLIT_OK,失败返回其他
*/
CW_FACE_API
cw_nirliveness_err_t cwFaceNirByImageData(void* pDetector, void* pNirHandle, cw_img_t* pImgVis, cw_img_t* pImgNir, cw_nirliv_res_t *pNirLivRes);
#if defined (__cplusplus)
}
#endif
#endif