wx_human_seg 3.0.0
Classes | Typedefs | Enumerations | Functions
wx_idphoto_c_api.h File Reference
#include "wx_api.h"
#include "wx_image_c_api.h"

Go to the source code of this file.

Classes

struct  WXIDPhotoConfig_t
 

Typedefs

typedef struct WXIDPhotoConfig_t WXIDPhotoConfig_t
 
typedef struct WXIDPhotoSettings_t WXIDPhotoSettings_t
 
typedef enum WXGlassesType_e WXGlassesType_e
 
typedef struct WXIDPhotoPreDetectResult_t WXIDPhotoPreDetectResult_t
 
typedef struct WXIDPhoto_t WXIDPhoto_t
 

Enumerations

enum  WXGlassesType_e { NoGlasses = 0 , NormalGlasses = 1 , DarkGlasses = 2 }
 

Functions

WX_API int WXIDPhotoSettings_Create (WXIDPhotoSettings_t **settings_p)
 
WX_API void WXIDPhotoSettings_Release (WXIDPhotoSettings_t *settings)
 
WX_API void WXIDPhotoSettings_SetInt (WXIDPhotoSettings_t *settings, const char *key, int value)
 
WX_API void WXIDPhotoSettings_SetFloat (WXIDPhotoSettings_t *settings, const char *key, float value)
 
WX_API void WXIDPhotoSettings_SetBool (WXIDPhotoSettings_t *settings, const char *key, uint8_t value)
 
WX_API void WXIDPhotoSettings_SetString (WXIDPhotoSettings_t *settings, const char *key, const char *str)
 
WX_API void WXIDPhotoSettings_SetIntArray (WXIDPhotoSettings_t *settings, const char *key, const int *arr, int size)
 
WX_API void WXIDPhotoSettings_SetFloatArray (WXIDPhotoSettings_t *settings, const char *key, const float *arr, int size)
 
WX_API int WXIDPhotoSettings_GetInt (WXIDPhotoSettings_t *settings, const char *key, int defValue)
 
WX_API float WXIDPhotoSettings_GetFloat (WXIDPhotoSettings_t *settings, const char *key, float defValue)
 
WX_API uint8_t WXIDPhotoSettings_GetBool (WXIDPhotoSettings_t *settings, const char *key, uint8_t defValue)
 
WX_API const char * WXIDPhotoSettings_GetString (WXIDPhotoSettings_t *settings, const char *key)
 
WX_API const int * WXIDPhotoSettings_GetIntArray (WXIDPhotoSettings_t *settings, const char *key, int *size_p)
 
WX_API const float * WXIDPhotoSettings_GetFloatArray (WXIDPhotoSettings_t *settings, const char *key, int *size_p)
 
WX_API int WXIDPhotoSettings_HasKey (WXIDPhotoSettings_t *settings, const char *key)
 
WX_API void WXIDPhotoPreDetectResult_Release (WXIDPhotoPreDetectResult_t *result)
 
WX_API int WXIDPhotoPreDetectResult_GetInt (WXIDPhotoPreDetectResult_t *result, const char *key, int defValue)
 
WX_API const float * WXIDPhotoPreDetectResult_GetFloatArray (WXIDPhotoPreDetectResult_t *result, const char *key)
 
WX_API int WXIDPhoto_Create (WXDeviceType deviceType, WXIDPhoto_t **idphoto_p)
 
WX_API void WXIDPhoto_Release (WXIDPhoto_t *p)
 
WX_API int WXIDPhoto_MakeIDPhoto (WXIDPhoto_t *idphoto, const WXImage_t *inImg, const WXIDPhotoConfig_t *config, const WXIDPhotoPreDetectResult_t *preResult, WXImage_t **result_img_p)
 
WX_API int WXIDPhoto_PreDetect (WXIDPhoto_t *idphoto, const WXImage_t *inImg, WXIDPhotoPreDetectResult_t **result_p)
 
WX_API void WXIDPhoto_SetSettings (WXIDPhoto_t *idphoto, const WXIDPhotoSettings_t *settings)
 

Detailed Description

证件照sdk接口,证件照制作和环境检测接口

Typedef Documentation

◆ WXGlassesType_e

佩戴眼镜类型

See also
wonxai::WXGlassesType

◆ WXIDPhoto_t

typedef struct WXIDPhoto_t WXIDPhoto_t

WXIDPhoto_t 证件照制作和预检测句柄类型

◆ WXIDPhotoConfig_t

证件照制作参数配置 具体说明参考 wonxai::WXIDPhotoConfig

See also
wonxai::WXIDPhotoConfig

◆ WXIDPhotoPreDetectResult_t

WXIDPhotoPreDetectResult_t

See also
wonxai::WXIDPhotoPreDetectResult

WXIDPhotoPreDetectResult_t可用key值和类型:

key list:
     face_count int,
     up_empty int,
     right_empty, int
     bottom_empty, int,
     left_empty, int
     size_score, int
     darkillum, int
     face_blur, int
     face_unbalance, int
     glasses, int(GlassesType_e)
     eyes_close, int
     mouth_close, int
     face_occlusion, int
     head_pose, floatArray
     gaze, int

◆ WXIDPhotoSettings_t

WXIDPhotoSettings_t

See also
wonxai::WXIDPhotoSettings

Enumeration Type Documentation

◆ WXGlassesType_e

佩戴眼镜类型

See also
wonxai::WXGlassesType
Enumerator
NoGlasses 

不戴眼镜

NormalGlasses 

佩戴普通眼镜

DarkGlasses 

佩戴墨镜

Function Documentation

◆ WXIDPhoto_Create()

WX_API int WXIDPhoto_Create ( WXDeviceType  deviceType,
WXIDPhoto_t **  idphoto_p 
)

创建WXIDPhoto_t对象

See also
wonxai::WXIDPhoto::WXIDPhoto
Note
调用前,保证已经成功调用WXSDKInitWithLicense*函数对SDK进行了初始化
Parameters
[in]deviceType是否使用gpu
[out]idphoto_p创建并返回WXIDPhoto_t对象
Returns
0: 成功; 非0: 错误码

◆ WXIDPhoto_MakeIDPhoto()

WX_API int WXIDPhoto_MakeIDPhoto ( WXIDPhoto_t idphoto,
const WXImage_t inImg,
const WXIDPhotoConfig_t config,
const WXIDPhotoPreDetectResult_t preResult,
WXImage_t **  result_img_p 
)

证件照制作接口

See also
wonxai::WXIDPhoto::makeIDPhoto
Parameters
[in]idphotoWXIDPhoto_t对象,由 WXIDPhoto_Create 函数创造
[in]inImg待制作原图
[in]config制作配置
[in]preResult环境检测结果,可以设置为NULL
[out]result_img_p制作好的证件照结果图
Returns
  成功 - 0
  失败 - 错误码

◆ WXIDPhoto_PreDetect()

WX_API int WXIDPhoto_PreDetect ( WXIDPhoto_t idphoto,
const WXImage_t inImg,
WXIDPhotoPreDetectResult_t **  result_p 
)

证件照环境检测

See also
wonxai::WXIDPhoto::preDetect
Note
只有证件照服务器版本SDK才能调用本函数
Parameters
[in]idphotoWXIDPhoto_t对象,由 WXIDPhoto_Create 函数创造
[in]inImg待检测的原图
[out]result_p检测结果 WXIDPhotoPreDetectResult_t
Returns
  成功 - 0
  失败 - 错误码

◆ WXIDPhoto_Release()

WX_API void WXIDPhoto_Release ( WXIDPhoto_t p)

释放WXIDPhoto_t对象

◆ WXIDPhoto_SetSettings()

WX_API void WXIDPhoto_SetSettings ( WXIDPhoto_t idphoto,
const WXIDPhotoSettings_t settings 
)

证件照制作和环境检测配置参数, 一般用不到本接口

◆ WXIDPhotoPreDetectResult_GetFloatArray()

WX_API const float * WXIDPhotoPreDetectResult_GetFloatArray ( WXIDPhotoPreDetectResult_t result,
const char *  key 
)

从WXIDPhotoPreDetectResult_t对象中获取浮点数组值, 如果不存在key值,返回NULL

See also
WXIDPhotoPreDetectResult_t

◆ WXIDPhotoPreDetectResult_GetInt()

WX_API int WXIDPhotoPreDetectResult_GetInt ( WXIDPhotoPreDetectResult_t result,
const char *  key,
int  defValue 
)

从WXIDPhotoPreDetectResult_t对象中获取整形值, 如果不存在key值,返回defValue

See also
WXIDPhotoPreDetectResult_t

◆ WXIDPhotoPreDetectResult_Release()

WX_API void WXIDPhotoPreDetectResult_Release ( WXIDPhotoPreDetectResult_t result)

释放WXIDPhotoPreDetectResult_t对象

◆ WXIDPhotoSettings_Create()

WX_API int WXIDPhotoSettings_Create ( WXIDPhotoSettings_t **  settings_p)

创建一个WXIDPhotoSettings_t对象

◆ WXIDPhotoSettings_GetBool()

WX_API uint8_t WXIDPhotoSettings_GetBool ( WXIDPhotoSettings_t settings,
const char *  key,
uint8_t  defValue 
)

获取WXIDPhotoSettings_t中的布尔值,

See also
wonxai::WXIDPhotoSettings::getBoolValue

◆ WXIDPhotoSettings_GetFloat()

WX_API float WXIDPhotoSettings_GetFloat ( WXIDPhotoSettings_t settings,
const char *  key,
float  defValue 
)

获取WXIDPhotoSettings_t中的浮点值,

See also
wonxai::WXIDPhotoSettings::getFloatValue

◆ WXIDPhotoSettings_GetFloatArray()

WX_API const float * WXIDPhotoSettings_GetFloatArray ( WXIDPhotoSettings_t settings,
const char *  key,
int *  size_p 
)

获取WXIDPhotoSettings_t中的浮点数组值, 不存在key,则返回NULL,

See also
wonxai::WXIDPhotoSettings::getFloatArray

◆ WXIDPhotoSettings_GetInt()

WX_API int WXIDPhotoSettings_GetInt ( WXIDPhotoSettings_t settings,
const char *  key,
int  defValue 
)

获取WXIDPhotoSettings_t中的整形值,

See also
wonxai::WXIDPhotoSettings::getIntValue

◆ WXIDPhotoSettings_GetIntArray()

WX_API const int * WXIDPhotoSettings_GetIntArray ( WXIDPhotoSettings_t settings,
const char *  key,
int *  size_p 
)

获取WXIDPhotoSettings_t中的整型数组值, 不存在key,则返回NULL,

See also
wonxai::WXIDPhotoSettings::getIntArray

◆ WXIDPhotoSettings_GetString()

WX_API const char * WXIDPhotoSettings_GetString ( WXIDPhotoSettings_t settings,
const char *  key 
)

获取WXIDPhotoSettings_t中的字符串值, 不存在key,则返回NULL,

See also
wonxai::WXIDPhotoSettings::getStringValue

◆ WXIDPhotoSettings_HasKey()

WX_API int WXIDPhotoSettings_HasKey ( WXIDPhotoSettings_t settings,
const char *  key 
)

判断是否存在key,

See also
wonxai::WXIDPhotoSettings::hasKey

◆ WXIDPhotoSettings_Release()

WX_API void WXIDPhotoSettings_Release ( WXIDPhotoSettings_t settings)

释放一个WXIDPhotoSettings_t对象

◆ WXIDPhotoSettings_SetBool()

WX_API void WXIDPhotoSettings_SetBool ( WXIDPhotoSettings_t settings,
const char *  key,
uint8_t  value 
)

为WXIDPhotoSettings_t设置值,

See also
wonxai::WXIDPhotoSettings::setValue

◆ WXIDPhotoSettings_SetFloat()

WX_API void WXIDPhotoSettings_SetFloat ( WXIDPhotoSettings_t settings,
const char *  key,
float  value 
)

为WXIDPhotoSettings_t设置值,

See also
wonxai::WXIDPhotoSettings::setValue

◆ WXIDPhotoSettings_SetFloatArray()

WX_API void WXIDPhotoSettings_SetFloatArray ( WXIDPhotoSettings_t settings,
const char *  key,
const float *  arr,
int  size 
)

为WXIDPhotoSettings_t设置值,

See also
wonxai::WXIDPhotoSettings::setValue

◆ WXIDPhotoSettings_SetInt()

WX_API void WXIDPhotoSettings_SetInt ( WXIDPhotoSettings_t settings,
const char *  key,
int  value 
)

为WXIDPhotoSettings_t设置值,

See also
wonxai::WXIDPhotoSettings::setValue

◆ WXIDPhotoSettings_SetIntArray()

WX_API void WXIDPhotoSettings_SetIntArray ( WXIDPhotoSettings_t settings,
const char *  key,
const int *  arr,
int  size 
)

为WXIDPhotoSettings_t设置值,

See also
wonxai::WXIDPhotoSettings::setValue

◆ WXIDPhotoSettings_SetString()

WX_API void WXIDPhotoSettings_SetString ( WXIDPhotoSettings_t settings,
const char *  key,
const char *  str 
)

为WXIDPhotoSettings_t设置值,

See also
wonxai::WXIDPhotoSettings::setValue