# FaceSDKForWinTest **Repository Path**: NOON47/FaceSDKForWinTest ## Basic Information - **Project Name**: FaceSDKForWinTest - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2019-11-28 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FaceSDKForWinTest 2020 06 08 添加比对接口 2020-04-07 更新 1 去获取机器码返回的信息 2 增加特征提取的参数选择可以选择不同的算法模型,默认为2 ,详见调用例子 3 修改初始化不成功调用接口的错误 4更改库名字 #### 介绍 中运科技人脸特征提取SDK-windows #### 软件架构 软件架构说明 #### 使用说明 1. 可以用cmake生成vs2015工程,test工程依赖opencv读图以及,dll不需要依赖opencv的库,可以自行下载opencv的库进行使用 2. 目录下的sdk文件夹为sdk包含的所有信息,详见里面的头文件说明 3. SDK函数说明 SDK需要授权后才能使用,SDK的授权以一个机器一个码为主 2020.1.19 添加获取机器码的exe文件,需要FaceSDKForWin.dll支持 GetSerialNumber\GetSerialNumber.exe (1)int FaceSDKForWin_API ZY_GetDevicesSerialNumber(char*EncryptionSerial);//获取设备机器信息并转成机器码,提供给中运科技获取授权码,该函数只需要调用一次,不需要每次都重复调用,用于SDK授权专用 /*The ZY_GetDevicesSerialNumber function will get the PC info and turn to EncryptionSerial,the EncryptionSerial must be given back to ZYTECHNOLOGY to get the decryptSerial code Parameters: EncryptionSerial[output],new [128] char* in mac[output],new [128] char* in cardstype[output] new [128] char* in error code: FACE_ERROR_SERAIL_P -401 FACE_SUCESS 0 Remarks: This function only can be called one time at program first used.*/ (2)int FaceSDKForWin_API ZY_FaceSDKInit(int nChannelNums, char*decryptSerial);//初始化函数,可以一次性初始化多路检测提取,参数1为需要初始化的路数,一般大于1小于8,在程序开始的时候调用,只需要调用一次 /*The ZY_FaceSDKInit function will initialize the algorithm engine module must be given back to ZYTECHNOLOGY to get the decryptSerial code Parameters: nChannelNums[intput],algorithm channel nums,for multi-thread mode,one thread uses one channel decryptSerial[intput],the decryptSerial code get from ZYTECHNOLOGY error code: FACE_SUCESS 0 FACE_ERROR_INITFAILED -1 FACE_ERROR_MAXCHANNEL -6 FACE_REPEAT_INITFAILED -9 FACE_ERROR_SERAIL_P -401 FACE_ERROR_DECRYPT_P -402 FACE_ERROR_TIMEOUT -403 FACE_ERROR_LOCAL_DECRYPT_P -404 FACE_ERROR_LOCAL_DECRYPT_FILE_P -405 FACE_ERROR_COMPARE_DECRYPT_FILE_P -406 FACE_ERROR_NO_DECRYPT_P -407 Remarks: This function only can be called one time at program initialization.*/ (3)int FaceSDKForWin_API ZY_DetectAndExtract( unsigned char* pdata, int width, int height, int channel, unsigned char* pFea);//人脸特征提取函数,需要输入BGR图像数据,输出长度为512的byte类型特征码 /*The ZY_DetectAndExtract function execute face detection and get face feature. Parameters: pdata[input],image data buffer,RGB24 format. width[input],image width. height[input],image height. channel[input],bits per pixel(24-RGB24 image),must be 24 pFea[output],the face feature.. Return Values: If the function succeeds, the return value is FACE_SUCESS If the function fails, the return value is negative. error code: FACE_SUCESS 0 FACE_ERROR_INITFAILED -1 FACE_ERROR_MAXCHANNEL -6 FACE_REPEAT_INITFAILED -9 FACE_ERROR_SERAIL_P -401 FACE_ERROR_DECRYPT_P -402 FACE_ERROR_TIMEOUT -403 FACE_ERROR_LOCAL_DECRYPT_P -404 FACE_ERROR_LOCAL_DECRYPT_FILE_P -405 FACE_ERROR_COMPARE_DECRYPT_FILE_P -406 FACE_ERROR_NO_DECRYPT_P -407 Remarks: 1.image data buffer(pImage) size must be nWidth*(bpp/8)*nHeight. 2.pFea must be allocated by caller,the memory size is FATURE_SIZE 3.image data have only have one face in*/ (4)int FaceSDKForWin_API ZY_FaceSDKRelease();//释放函数,与初始化函数一杨,只需要调用一次,在程序退出时候调用 /* The ZY_FaceSDKRelease 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.*/ 3. 调用顺序 (1) ZY_GetDevicesSerialNumber 获取机器码 提供给中运科技以获取授权码,授权码为一个机器一个码 (2) ZY_FaceSDKInit 程序初始化,包括SDK授权以及人脸SDK功能初始化 (3) ZY_DetectAndExtract 初始化成功后获取人脸特征 (4) ZY_FFCompara 1:1比对接口 (5) ZY_FaceSDKRelease() 释放资源,在程序退出时候调用