#ifndef THFACEPROP_I_H #define THFACEPROP_I_H #include "THFaceImage_i.h" /* * ============================================================================ * Name : THFaceProperty_i.h * Part of : Face Property (THFaceProperty) SDK * Created : 7.8.2016 by XXX * Description: * THFaceProp_i.h - Face Property (THFaceProperty) SDK header file * Version : 1.0.0 * Copyright: All Rights Reserved by XXXX * Revision: * ============================================================================ */ struct THFP_Result_V1 { int gender;//1-male,0-female int age;//range[0-100] int beauty_level;//range[0-100] int smile_level;//range[0-100] }; struct THFP_Result_V2 { int gender;//1-male,0-female int age;//range[0-100] int race; //[1-white,2-yellow,3-black] int beauty_level;//range[0-100] int smile_level;//range[0-100] }; #define THFACEPROP_API extern "C" THFACEPROP_API int THFP_Create(short nChannelNum); /* The THFP_Create function will initialize the algorithm engine module Parameters: nChannelNum[intput],algorithm channel num,for multi-thread mode,one thread uses one channel Return Values: If the function succeeds, the return value is valid channel number. If the function fails, the return value is zero or negative; error code: -99,invalid license. Remarks: This function only can be called one time at program initialization. */ THFACEPROP_API void THFP_Release(); /* The THFP_Release function will release the algorithm engine module Parameters: No parameter. Return Values: No return value. Remarks: This function only can be called one time at program exit. */ THFACEPROP_API int THFP_Execute_V1(short nChannelID, BYTE* pBGR, int nWidth, int nHeight, THFI_FacePos* ptfp, THFP_Result_V1* pResult); /* The THFP_Execute_V1 function execute face property analysis. Parameters: nChannelID[input],channel ID(from 0 to nChannelNum-1) pBGR[input],point to an image buffer,BGR format. nWidth[input],the image width. nHeight[input],the image height. ptfp[input],the facial data of a face. pResult[output],the face property result Return Values: If the function succeeds, the return value is 0. If the function fails, the return value is nagative. error code: -99,invalid license. -1,pBuf,ptfp,pFeature is NULL -2,nChannelID is invalid or SDK is not initialized Remarks: No remark. */ THFACEPROP_API int THFP_Execute_1N_V1(short nChannelID, BYTE* pBGR, int nWidth, int nHeight, THFI_FacePos* ptfps, THFP_Result_V1* pResults,int nFaceCount); /* The THFP_Execute_1N_V1 function execute face property analysis. Parameters: nChannelID[input],channel ID(from 0 to nChannelNum-1) pBGR[input],point to an image buffer,BGR format. nWidth[input],the image width. nHeight[input],the image height. ptfps[input],the facial data of muti-faces pResults[output],the face property results of muti-faces nFaceCount[input],the face number Return Values: If the function succeeds, the return value is 0. If the function fails, the return value is nagative. error code: -99,invalid license. -1,pBGR,ptfps,pResults is NULL,OR nFaceCount is less than 1 -2,nChannelID is invalid or SDK is not initialized Remarks: No remark. */ THFACEPROP_API int THFP_Execute_V2(short nChannelID, BYTE* pBGR, int nWidth, int nHeight, THFI_FacePos* ptfp, THFP_Result_V2* pResult); /* The THFP_Execute_V2 function execute face property analysis. Parameters: nChannelID[input],channel ID(from 0 to nChannelNum-1) pBGR[input],point to an image buffer,BGR format. nWidth[input],the image width. nHeight[input],the image height. ptfp[input],the facial data of a face. pResult[output],the face property result Return Values: If the function succeeds, the return value is 0. If the function fails, the return value is nagative. error code: -99,invalid license. -1,pBGR,ptfp,pResult is NULL -2,nChannelID is invalid or SDK is not initialized Remarks: No remark. */ THFACEPROP_API int THFP_Execute_1N_V2(short nChannelID, BYTE* pBGR, int nWidth, int nHeight, THFI_FacePos* ptfps, THFP_Result_V2* pResults, int nFaceCount); /* The THFP_Execute_1N_V2 function execute face property analysis. Parameters: nChannelID[input],channel ID(from 0 to nChannelNum-1) pBGR[input],point to an image buffer,BGR format. nWidth[input],the image width. nHeight[input],the image height. ptfps[input],the facial data of muti-faces pResults[output],the face property results of muti-faces nFaceCount[input],the face number Return Values: If the function succeeds, the return value is 0. If the function fails, the return value is nagative. error code: -99,invalid license. -1,pBGR,ptfps,pResults is NULL,OR nFaceCount is less than 1 -2,nChannelID is invalid or SDK is not initialized Remarks: No remark. */ #endif