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.
90 lines
1.9 KiB
90 lines
1.9 KiB
#ifndef CWFaceAttribute_H
|
|
#define CWFaceAttribute_H
|
|
|
|
#include "CWFaceConfig.h"
|
|
|
|
|
|
#if defined (__cplusplus)
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
* 功能:创建年龄段性别人种属性句柄
|
|
* 输入:
|
|
* pConfigurePath - 模型配置文件
|
|
* pLicence - 授权码(仅用于安卓平台,PC端传NULL即可)
|
|
* 输出:
|
|
* errCode - 成功返回CW_OK,失败返回其他
|
|
* 返回值:
|
|
* void* - 属性句柄: 成功返回句柄,失败返回0
|
|
*/
|
|
CW_FACE_API
|
|
void* cwCreateAttributeHandle(cw_errcode_t* errCode, const char* pConfigurePath, const char* pLicence);
|
|
|
|
|
|
/**
|
|
* 功能:释放年龄段性别人种属性句柄
|
|
* 输入:
|
|
* pAttributeHandle - 属性句柄
|
|
* 输出:
|
|
* 无
|
|
* 返回值:
|
|
* 无
|
|
*/
|
|
CW_FACE_API
|
|
void cwReleaseAttributeHandle(void* pAttributeHandle);
|
|
|
|
|
|
/**
|
|
* 功能:获得年龄段估计
|
|
* 输入:
|
|
* pAttributeHandle - 属性句柄
|
|
* pAlignedFace - 对齐人脸数据
|
|
* 输出:
|
|
* pAgeGroup - 年龄估计值
|
|
* 返回值:
|
|
* 错误码
|
|
*/
|
|
CW_FACE_API
|
|
cw_errcode_t cwGetAgeEval(void* pAttributeHandle, cw_aligned_face_t* pAlignedFace, int* pAgeGroup);
|
|
|
|
|
|
/**
|
|
* 功能:获得性别估计
|
|
* 输入:
|
|
* pAttributeHandle - 属性句柄
|
|
* pAlignedFace - 对齐人脸数据
|
|
* 输出:
|
|
* pGender - 性别估计值,0 女性, 1 男性
|
|
* confidence - 置信度,0-1之间的小数, 值越大可信度越高
|
|
* 返回值:
|
|
* 错误码
|
|
*/
|
|
CW_FACE_API
|
|
cw_errcode_t cwGetGenderEval(void* pAttributeHandle, cw_aligned_face_t* pAlignedFace, int* pGender, float* confidence);
|
|
|
|
|
|
/**
|
|
* 功能:获得人种估计
|
|
* 输入:
|
|
* pAttributeHandle - 属性句柄
|
|
* pAlignedFace - 对齐人脸数据
|
|
* 输出:
|
|
* pRace - 人种估计值,0 黑人 1 白人 2 黄人
|
|
* confidence - 置信度,0-1之间的小数, 值越大可信度越高
|
|
* 返回值:
|
|
* 错误码
|
|
*/
|
|
CW_FACE_API
|
|
cw_errcode_t cwGetRaceEval(void* pAttributeHandle, cw_aligned_face_t* pAlignedFace, int* pRace, float* confidence);
|
|
|
|
|
|
#if defined (__cplusplus)
|
|
}
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|