虹软人脸识别-数据结构

版本:3.0.3902010101.5

参考:ARCSOFT_ARC_FACE_DEVELOPER'S_GUIDE.pdf

ASF_VERSION

SDK版本信息

typedef char* MPChar;

类型 变量名 描述
MPChar Version 版本号
MPChar BuildDate 构建日期
MPChar CopyRight 版权说明

示例:

#include <iostream>

#include "arcsoft_face_sdk.h"
#include "merror.h"

#pragma comment(lib, "libarcsoft_face_engine.lib")

using namespace std;

int main() {
    ASF_VERSION asf = ASFGetVersion();
    cout << "Version:\t" << asf.Version << endl;
    cout << "BuildDate:\t" << asf.BuildDate << endl;
    cout << "CopyRight:\t" << asf.CopyRight << endl;
}

ASF_ActiveFileInfo

激活文件信息。

typedef char* MPChar

类型 变量名 描述
MPChar startTime SDK开始时间
MPChar endTime SDK截止时间
MPChar platform 平台版本
MPChar sdkType SDK类型
MPChar appId APPID
MPChar sdkKey SDKKEY
MPChar sdkVersion SDK版本号
MPChar fileVersion 激活文件版本号

示例:

#include <iostream>

#include "arcsoft_face_sdk.h"
#include "merror.h"

#pragma comment(lib, "libarcsoft_face_engine.lib")

using namespace std;

int main() {
    ASF_ActiveFileInfo info;
    ASFGetActiveFileInfo(&info);

    cout << "start time:\t" << info.startTime << endl;
    cout << "end time:\t" << info.endTime << endl;
    cout << "platform:\t" << info.platform << endl;
    cout << "sdk type:\t" << info.sdkType << endl;
    cout << "app id:\t\t" << info.appId << endl;
    cout << "sdk key:\t" << info.sdkKey << endl;
    cout << "sdk version:\t" << info.sdkVersion << endl;
    cout << "file version:\t" << info.fileVersion << endl;
}

ASF_SingleFaceInfo

单人脸信息。

typedef signed int MInt32

typedef struct __tag_rect{
    MInt32left;
    MInt32top;
    MInt32right;
    MInt32bottom;
    } MRECT, *PMRECT;
类型 变量名 描述
MRECT faceRect 人脸框
MInt32 faceOrient 人脸角度

ASF_MultiFaceInfo

多人脸信息。

typedef signed int MInt32;

typedef struct __tag_rect{
    MInt32left;
    MInt32top;
    MInt32right;
    MInt32bottom;
    } MRECT, *PMRECT;
类型 变量名 描述
MRECT* faceRect 人脸框
MInt32* faceOrient 人脸角度
MInt32 faceNum 检测到的人脸数
MInt32* faceID 一张人脸从进入画面直到离开画面,faceID不变。在VIDEO模式下有效,IMAGE模式下为空

ASF_FaceFeature

人脸特征。

typedef signed int MInt32;
typedef unsigned char MByte;

类型 变量名 描述
MByte* feature 人脸特征
MInt32 featureSize 人脸特征长度

ASF_AgeInfo

年龄信息。

typedef signed int MInt32;

类型 变量名 描述
MInt32* ageArray 0:未知;>0:年龄
MInt32 num 检测的人脸数

ASF_GenderInfo

性别信息。

typedef signed int MInt32;

类型 变量名 描述
MInt32* genderArray 0:男性;1:女性;-1:未知
MInt32 num 检测的人脸数

ASF_Face3DAngle

3D角度信息。

typedef signed int MInt32;
typedef float MFloat;

类型 变量名 描述
MFloat* roll 横滚角
MFloat* yaw 偏航角
MFloat* pitch 俯仰角
MInt32* status 0:正常;非0:异常
MInt32 num 检测的人脸数

ASF_LivenessThreshold

活体置信度。

typedef float MFloat;

类型 变量名 描述
MFloat thresholdmodel_BGR BGR活体检测阈值设置,默认值0.5
MFloat thresholdmodel_IR IR活体检测阈值设置,默认值0.7

ASF_LivenessInfo

活体信息。

typedef signed int MInt32;

类型 变量名 描述
MInt32* isLive 0::非真人; 1:真人;-1:不确定; -2:传入人脸数 > 1;-3:人脸过小;-4: 角度过大;-5:人脸超出边界
MInt32 num 检测的人脸数

ASVLOFFSCREEN

图像数据信息。

typedef LPASVLOFFSCREEN LPASF_ImageData;
typedef unsigned int MUInt32;
typedef signed int MInt32;
typedef unsigned char MUInt8

类型 变量名 描述
MUInt32* u32PixelArrayFormat 颜色格式
MInt32 i32Width 图像宽度
MInt32 i32Height 图像高度
MUInt8** ppu8Plane 图像数据
MInt32* pi32Pitch 图像步长

comment: