# faceJNI_Test **Repository Path**: zydltech/faceJNI_Test ## Basic Information - **Project Name**: faceJNI_Test - **Description**: 中运科技人脸特征提取SDK-windows - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2019-11-25 - **Last Updated**: 2024-03-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # faceJNI_Test #### 介绍 中运科技人脸特征提取SDK-x86 2020 05-09 修改linux下无法获取序列号的问题 2020 05-06 更新了部分照片抓不到脸的情况 同步更新windows与linux,降低CPU占用率。更新了 函数错误码返回,详见 Test.java 2020 03-11 修改了linux下的依赖问题,更改jar包,更新库名称,改变库及包的大小,jar包含linux与windows的应用 #### 软件架构 软件架构说明 #### 使用说明 1. Eclipse工程 2. SDK函数说明 SDK需要授权后才能使用,SDK的授权以一个机器一个码为主 (1)int ZY_GetDevicesSerialNumber(ByteBuffer EncryptionSerial, ByteBuffer mac, ByteBuffer cardstype);//获取设备机器信息并转成机器码,提供给中运科技获取授权码,该函数只需要调用一次,不需要每次都重复调用,用于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 ZY_FaceSDKInit(int nChannelNums, ByteBuffer 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 ZY_DetectAndExtract(ByteBuffer pdata, int width, int height, int channel, ByteBuffer 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 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_FaceSDKRelease() 释放资源,在程序退出时候调用