Commit 685e0ed3 by zhangbo

make table show correctly shown on html

1 parent 23a66b7f
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
You can adapt this file completely to your liking, but it should at least You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive. contain the root `toctree` directive.
Welcome to SeetaDoc's documentation! Welcome to Seeta's documentation!
==================================== ====================================
.. toctree:: .. toctree::
...@@ -11,3 +11,9 @@ Welcome to SeetaDoc's documentation! ...@@ -11,3 +11,9 @@ Welcome to SeetaDoc's documentation!
:caption: Contents: :caption: Contents:
人脸检测 人脸检测
特征点检测
人脸识别
人脸跟踪
质量评估器
近红外活体
# 人脸检测器 # 人脸检测器
...@@ -8,69 +8,189 @@ ...@@ -8,69 +8,189 @@
### **2.1 struct SeetaImageData**<br> ### **2.1 struct SeetaImageData**<br>
|名称 | 类型 | 说明| <table border="1">
|---|---|---| <tr>
|data|unit8_t* |图像数据| <th>名称</th>
|width | int32_t | 图像的宽度| <th>类型</th>
|height | int32_t | 图像的高度| <th>说明</th>
|channels | int32_t | 图像的通道数| </tr>
<tr>
说明:存储彩色(三通道)或灰度(单通道)图像,像素连续存储,行优先,采用 BGR888 格式存放彩色图像,单字节灰度值存放灰度图像。 <th>data</th>
<th>uint8_t*</th>
<th>图像数据</th>
</tr>
<tr>
<th>width</th>
<th>int32_t</th>
<th>图像的宽度</th>
</tr>
<tr>
<th>height</th>
<th>int32_t</th>
<th>图像的高度</th>
</tr>
<tr>
<th>channels</th>
<th>int32_t</th>
<th>图像的通道数</th>
</tr>
</table>
<br>
说明:存储彩色(三通道)或灰度(单通道)图像,像素连续存储,行优先,采用 BGR888 格式存放彩色图像,单字节灰度值存放灰度图像。<br>
### **2.2 struct SeetaRect**<br> ### **2.2 struct SeetaRect**<br>
|名称 | 类型 | 说明| <table border="1">
|---|---|---| <tr>
|x|int32_t |人脸区域左上角横坐标| <th>名称</th>
|y| int32_t | 人脸区域左上角纵坐标| <th>类型</th>
|width| int32_t | 人脸区域宽度| <th>说明</th>
|height| int32_t | 人脸区域高度| </tr>
<tr>
<th>x</th>
<th>int32_t</th>
<th>人脸区域左上角横坐标</th>
</tr>
<tr>
<th>y</th>
<th>int32_t</th>
<th>人脸区域左上角纵坐标</th>
</tr>
<tr>
<th>width</th>
<th>int32_t</th>
<th>人脸区域宽度</th>
</tr>
<tr>
<th>height</th>
<th>int32_t</th>
<th>人脸区域高度</th>
</tr>
</table>
<br>
### **2.3 struct SeetaFaceInfo**<br> ### **2.3 struct SeetaFaceInfo**<br>
|名称 | 类型 | 说明| <table border="1">
|---|---|---| <tr>
|pos|SeetaRect|人脸位置| <th>名称</th>
|score|float|人脸置信分数| <th>类型</th>
<th>说明</th>
### **2.4 struct SeetaFaceInfoArray**<br> </tr>
<tr>
|名称 | 类型 | 说明| <th>pos</th>
|---|---|---| <th>SeetaRect</th>
|data|const SeetaFaceInfo*|人脸信息数组| <th>人脸位置</th>
|size|int|人脸信息数组长度| </tr>
<tr>
<th>score</th>
<th>float</th>
<th>人脸置信分数</th>
</tr>
</table>
<br>
### **2.4 struct SeetaFaceInfoArray**<br>
<table border="1">
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<th>data</th>
<th>const SeetaFaceInfo*</th>
<th>人脸信息数组</th>
</tr>
<tr>
<th>size</th>
<th>int</th>
<th>人脸信息数组长度</th>
</tr>
<table>
<br>
## 3 class FaceDetector ## 3 class FaceDetector
人脸检测器。 人脸检测器。<br>
### 3.1 Enum SeetaDevice ### 3.1 Enum SeetaDevice
模型运行的计算设备。<br> 模型运行的计算设备。<br>
|名称 |说明| <table border="1">
|---|---| <tr>
|SEETA_DEVICE_AUTO|自动检测,会优先使用 GPU| <th>名称</th>
|SEETA_DEVICE_CPU|使用CPU计算| <th>说明</th>
|SEETA_DEVICE_GPU|使用GPU计算| </tr>
<tr>
<th>SEETA_DEVICE_AUTO</th>
<th>自动检测,会优先使用 GPU</th>
</tr>
<tr>
<th>SEETA_DEVICE_CPU</th>
<th>使用CPU计算</th>
</tr>
<tr>
<th>SEETA_DEVICE_GPU</th>
<th>使用GPU计算</th>
</tr>
<table>
<br>
### 3.2 struct SeetaModelSetting ### 3.2 struct SeetaModelSetting
构造人脸检测器需要传入的结构体参数。<br> 构造人脸检测器需要传入的结构体参数。<br>
|参数 | 类型 |缺省值|说明| <table border="1">
|---|---|---|---| <tr>
|model|const char**| |检测器模型| <th>参数</th>
|id|int| |GPU id| <th>类型</th>
|device|SeetaDevice|AUTO |计算设备(CPU 或者 GPU)| <th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>model</th>
<th>const char**</th>
<th></th>
<th>检测器模型</th>
</tr>
<tr>
<th>id</th>
<th>int</th>
<th></th>
<th>GPU id</th>
</tr>
<tr>
<th>device</th>
<th>SeetaDevice</th>
<th>AUTO</th>
<th>计算设备(CPU 或者 GPU)</th>
</tr>
<table>
<br>
### 3.3 构造函数 ### 3.3 构造函数
#### FaceDetector #### FaceDetector
|参数 | 类型 |缺省值|说明| <table border="1">
|---|---|---|---| <tr>
|setting|const SeetaModelSetting&| |检测器结构参数| <th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>setting </th>
<th>const SeetaModelSetting& </th>
<th> </th>
<th>检测器结构参数 </th>
</tr>
<table>
<br>
### 3.4 成员函数 ### 3.4 成员函数
...@@ -78,12 +198,30 @@ ...@@ -78,12 +198,30 @@
输入彩色图像,检测其中的人脸。<br> 输入彩色图像,检测其中的人脸。<br>
|参数 | 类型 |缺省值|说明| <table border="1">
|---|---|---|---| <tr>
|image|const SeetaImageData&| |输入的图像数据| <th>参数</th>
|返回值|SeetaFaceInfoArray| |人脸信息数组| <th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>image </th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 输入的图像数据</th>
</tr>
<tr>
<th>返回值 </th>
<th>SeetaFaceInfoArray </th>
<th> </th>
<th> 人脸信息数组 </th>
</tr>
<table>
<br>
#### set #### set
设置人脸检测器相关属性值。其中<br> 设置人脸检测器相关属性值。其中<br>
**PROPERTY_MIN_FACE_SIZE**: 表示人脸检测器可以检测到的最小人脸,该值越小,支持检测到的人脸尺寸越小,检测速度越慢,默认值为20;<br> **PROPERTY_MIN_FACE_SIZE**: 表示人脸检测器可以检测到的最小人脸,该值越小,支持检测到的人脸尺寸越小,检测速度越慢,默认值为20;<br>
**PROPERTY_THRESHOLD**: **PROPERTY_THRESHOLD**:
...@@ -91,21 +229,58 @@ ...@@ -91,21 +229,58 @@
**PROPERTY_MAX_IMAGE_WIDTH****PROPERTY_MAX_IMAGE_HEIGHT**: **PROPERTY_MAX_IMAGE_WIDTH****PROPERTY_MAX_IMAGE_HEIGHT**:
分别表示支持输入的图像的最大宽度和高度;<br> 分别表示支持输入的图像的最大宽度和高度;<br>
**PROPERTY_NUMBER_THREADS**: **PROPERTY_NUMBER_THREADS**:
表示人脸检测器计算线程数,默认为 4. 表示人脸检测器计算线程数,默认为 4.<br>
|参数 | 类型 |缺省值|说明| <table border="1">
|---|---|---|---| <tr>
|property|Property||人脸检测器属性类别| <th>参数</th>
|value|double||设置的属性值| <th>类型</th>
|返回值|void| | | | <th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>property </th>
<th>Property </th>
<th> </th>
<th> 人脸检测器属性类别</th>
</tr>
<tr>
<th> value</th>
<th> double</th>
<th> </th>
<th> 设置的属性值 </th>
</tr>
<tr>
<th> 返回值</th>
<th>void </th>
<th> </th>
<th> </th>
</tr>
<table>
<br>
#### get #### get
获取人脸检测器相关属性值。<br>
|参数 | 类型 |缺省值|说明|
|---|---|---|---|
|property|Property||人脸检测器属性类别|
|返回值|double||对应的人脸属性值|
获取人脸检测器相关属性值。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>property </th>
<th> Property</th>
<th> </th>
<th> 人脸检测器属性类别</th>
</tr>
<tr>
<th> 返回值</th>
<th>double </th>
<th> </th>
<th> 对应的人脸属性值 </th>
</tr>
<table>
<br>
\ No newline at end of file
# 人脸识别器
# 人脸识别器
## **1. 接口简介** <br>
人脸识别器要求输入原始图像数据和人脸特征点(或者裁剪好的人脸数据),对输入的人脸提取特征值数组,根据提取的特征值数组对人脸进行相似度比较。<br>
## **2. 类型说明**<br>
### **2.1 struct SeetaImageData**<br>
<table border="1">
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<th>data</th>
<th>uint8_t*</th>
<th>图像数据</th>
</tr>
<tr>
<th>width</th>
<th>int32_t</th>
<th>图像的宽度</th>
</tr>
<tr>
<th>height</th>
<th>int32_t</th>
<th>图像的高度</th>
</tr>
<tr>
<th>channels</th>
<th>int32_t</th>
<th>图像的通道数</th>
</tr>
</table>
<br>
说明:存储彩色(三通道)或灰度(单通道)图像,像素连续存储,行优先,采用 BGR888 格式存放彩色图像,单字节灰度值存放灰度图像。<br>
### **2.2 struct SeetaPointF**<br>
<table border="1">
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<th> x</th>
<th> double</th>
<th>人脸特征点横坐标 </th>
</tr>
<tr>
<th> y</th>
<th> double</th>
<th> 人脸特征点纵坐标</th>
</tr>
</table>
<br>
## 3 class FaceRecognizer
人脸识别器。<br>
### 3.1 Enum SeetaDevice
模型运行的计算设备。<br>
<table border="1">
<tr>
<th>名称</th>
<th>说明</th>
</tr>
<tr>
<th>SEETA_DEVICE_AUTO </th>
<th>自动检测,会优先使用 GPU </th>
</tr>
<tr>
<th> SEETA_DEVICE_CPU</th>
<th> 使用CPU计算</th>
</tr>
<tr>
<th>SEETA_DEVICE_GPU </th>
<th>使用GPU计算 </th>
</tr>
</table>
<br>
### 3.2 struct SeetaModelSetting
构造人脸识别器需要传入的结构体参数。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> model</th>
<th> const char**</th>
<th> </th>
<th> 检测器模型</th>
</tr>
<tr>
<th> id</th>
<th> int</th>
<th> </th>
<th> GPU id</th>
</tr>
<tr>
<th> device</th>
<th> SeetaDevice</th>
<th> AUTO</th>
<th> 计算设备(CPU 或者 GPU)</th>
</tr>
<table>
<br>
### 3.3 构造函数
#### FaceRecognizer
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> setting</th>
<th> const SeetaModelSetting&</th>
<th> </th>
<th> 识别器结构参数</th>
</tr>
<table>
<br>
### 3.4 成员函数
#### GetCropFaceWidth
获取裁剪人脸的宽度。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> 返回值</th>
<th> int</th>
<th> </th>
<th> 返回的人脸宽度</th>
</tr>
<table>
<br>
#### GetCropFaceHeight
获取裁剪的人脸高度。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> 返回值</th>
<th> int</th>
<th> </th>
<th> 返回的人脸高度</th>
</tr>
<table>
<br>
#### GetCropFaceChannels
获取裁剪的人脸数据通道数。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> 返回值</th>
<th> int</th>
<th> </th>
<th> 返回的人脸数据通道数</th>
</tr>
<table>
<br>
#### CropFace
裁剪人脸。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> image</th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 原始图像数据</th>
</tr>
<tr>
<th> points</th>
<th> const SeetaPointF*</th>
<th> </th>
<th> 人脸特征点数组</th>
</tr>
<tr>
<th> face</th>
<th> SeetaImageData&</th>
<th> </th>
<th> 返回的裁剪人脸</th>
</tr>
<tr>
<th> 返回值</th>
<th> bool</th>
<th> </th>
<th> true表示人脸裁剪成功</th>
</tr>
<table>
<br>
#### GetCropFaceWidthV2
获取裁剪人脸的宽度。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> 返回值</th>
<th> int</th>
<th> </th>
<th> 返回的人脸宽度</th>
</tr>
<table>
<br>
#### GetCropFaceHeightV2
获取裁剪的人脸高度。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> 返回值</th>
<th> int</th>
<th> </th>
<th> 返回的人脸高度</th>
</tr>
<table>
<br>
#### GetCropFaceChannelsV2
获取裁剪的人脸数据通道数。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> 返回值</th>
<th> int</th>
<th> </th>
<th> 返回的人脸数据通道数</th>
</tr>
<table>
<br>
#### CropFaceV2
裁剪人脸。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> image</th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 原始图像数据</th>
</tr>
<tr>
<th> points</th>
<th> const SeetaPointF*</th>
<th> </th>
<th> 人脸特征点数组</th>
</tr>
<tr>
<th> face</th>
<th> SeetaImageData&</th>
<th> </th>
<th> 返回的裁剪人脸</th>
</tr>
<tr>
<th> 返回值</th>
<th> bool</th>
<th> </th>
<th> true表示人脸裁剪成功</th>
</tr>
<table>
<br>
#### CropFaceV2
裁剪人脸。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> image</th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 原始图像数据</th>
</tr>
<tr>
<th> points</th>
<th> const SeetaPointF*</th>
<th> </th>
<th> 人脸特征点数组</th>
</tr>
<tr>
<th> 返回值</th>
<th> seeta::ImageData</th>
<th> </th>
<th> 返回的裁剪人脸</th>
</tr>
<table>
<br>
#### GetExtractFeatureSize
获取特征值数组的长度。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> 返回值</th>
<th> int</th>
<th> </th>
<th> 特征值数组的长度</th>
</tr>
<table>
<br>
#### ExtractCroppedFace
输入裁剪后的人脸图像,提取人脸的特征值数组。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> face</th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 裁剪后的人脸图像数据</th>
</tr>
<tr>
<th> features</th>
<th> float*</th>
<th> </th>
<th> 返回的人脸特征值数组</th>
</tr>
<tr>
<th> 返回值</th>
<th> bool</th>
<th> </th>
<th> true表示提取特征成功</th>
</tr>
<table>
<br>
#### Extract
输入原始图像数据和人脸特征点数组,提取人脸的特征值数组。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> image</th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 原始的人脸图像数据</th>
</tr>
<tr>
<th> points</th>
<th> const SeetaPointF*</th>
<th> </th>
<th> 人脸的特征点数组</th>
</tr>
<tr>
<th> features</th>
<th> float*</th>
<th> </th>
<th> 返回的人脸特征值数组</th>
</tr>
<tr>
<th> 返回值</th>
<th> bool</th>
<th> </th>
<th> true表示提取特征成功</th>
</tr>
<table>
<br>
#### CalculateSimilarity
比较两人脸的特征值数据,获取人脸的相似度值。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> features1</th>
<th> const float*</th>
<th> </th>
<th> 特征数组一</th>
</tr>
<tr>
<th> features2</th>
<th> const float*</th>
<th> </th>
<th> 特征数组二</th>
</tr>
<tr>
<th> 返回值</th>
<th> float</th>
<th> </th>
<th> 相似度值</th>
</tr>
<table>
<br>
#### set
设置人脸检测器相关属性值。其中<br>
**PROPERTY_NUMBER_THREADS**:
表示人脸检测器计算线程数,默认为 4.<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>property </th>
<th>Property </th>
<th> </th>
<th> 人脸检测器属性类别</th>
</tr>
<tr>
<th> value</th>
<th> double</th>
<th> </th>
<th> 设置的属性值 </th>
</tr>
<tr>
<th> 返回值</th>
<th>void </th>
<th> </th>
<th> </th>
</tr>
<table>
<br>
#### get
获取人脸检测器相关属性值。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>property </th>
<th> Property</th>
<th> </th>
<th> 人脸检测器属性类别</th>
</tr>
<tr>
<th> 返回值</th>
<th>double </th>
<th> </th>
<th> 对应的人脸属性值 </th>
</tr>
<table>
<br>
\ No newline at end of file
# 人脸跟踪器
# 人脸跟踪器
## **1. 接口简介** <br>
人脸跟踪器会对输入的彩色图像或者灰度图像中的人脸进行跟踪,并返回所有跟踪到的人脸信息。<br>
## **2. 类型说明**<br>
### **2.1 struct SeetaImageData**<br>
<table border="1">
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<th>data</th>
<th>uint8_t*</th>
<th>图像数据</th>
</tr>
<tr>
<th>width</th>
<th>int32_t</th>
<th>图像的宽度</th>
</tr>
<tr>
<th>height</th>
<th>int32_t</th>
<th>图像的高度</th>
</tr>
<tr>
<th>channels</th>
<th>int32_t</th>
<th>图像的通道数</th>
</tr>
</table>
<br>
说明:存储彩色(三通道)或灰度(单通道)图像,像素连续存储,行优先,采用 BGR888 格式存放彩色图像,单字节灰度值存放灰度图像。<br>
### **2.2 struct SeetaRect**<br>
<table border="1">
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<th>x</th>
<th>int32_t</th>
<th>人脸区域左上角横坐标</th>
</tr>
<tr>
<th>y</th>
<th>int32_t</th>
<th>人脸区域左上角纵坐标</th>
</tr>
<tr>
<th>width</th>
<th>int32_t</th>
<th>人脸区域宽度</th>
</tr>
<tr>
<th>height</th>
<th>int32_t</th>
<th>人脸区域高度</th>
</tr>
</table>
<br>
### **2.3 struct SeetaTrackingFaceInfo**<br>
<table border="1">
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<th>pos</th>
<th>SeetaRect</th>
<th>人脸位置</th>
</tr>
<tr>
<th>score</th>
<th>float</th>
<th>人脸置信分数</th>
</tr>
<tr>
<th>frame_no</th>
<th>int</th>
<th>视频帧的索引</th>
</tr>
<tr>
<th>PID</th>
<th>int</th>
<th>跟踪的人脸标识id</th>
</tr>
</table>
<br>
### **2.4 struct SeetaTrackingFaceInfoArray**<br>
<table border="1">
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<th>data</th>
<th>const SeetaTrackingFaceInfo*</th>
<th>人脸信息数组</th>
</tr>
<tr>
<th>size</th>
<th>int</th>
<th>人脸信息数组长度</th>
</tr>
<table>
<br>
## 3 class FaceTracker
人脸跟踪器。<br>
### 3.1 Enum SeetaDevice
模型运行的计算设备。<br>
<table border="1">
<tr>
<th>名称</th>
<th>说明</th>
</tr>
<tr>
<th>SEETA_DEVICE_AUTO</th>
<th>自动检测,会优先使用 GPU</th>
</tr>
<tr>
<th>SEETA_DEVICE_CPU</th>
<th>使用CPU计算</th>
</tr>
<tr>
<th>SEETA_DEVICE_GPU</th>
<th>使用GPU计算</th>
</tr>
<table>
<br>
### 3.2 struct SeetaModelSetting
构造人脸跟踪器需要传入的结构体参数。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>model</th>
<th>const char**</th>
<th></th>
<th>检测器模型</th>
</tr>
<tr>
<th>id</th>
<th>int</th>
<th></th>
<th>GPU id</th>
</tr>
<tr>
<th>device</th>
<th>SeetaDevice</th>
<th>AUTO</th>
<th>计算设备(CPU 或者 GPU)</th>
</tr>
<table>
<br>
### 3.3 构造函数
#### FaceTrakcer
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>setting </th>
<th>const SeetaModelSetting& </th>
<th> </th>
<th>检测器结构参数 </th>
</tr>
<tr>
<th>video_width </th>
<th>int </th>
<th> </th>
<th>视频的宽度 </th>
</tr>
<tr>
<th>video_height </th>
<th>int </th>
<th> </th>
<th>视频的高度 </th>
</tr>
<table>
<br>
### 3.4 成员函数
#### SetSingleCalculationThreads
设置底层的计算线程数量。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> num</th>
<th> int</th>
<th> </th>
<th> 线程数量</th>
</tr>
<table>
<br>
#### Track
对视频帧中的人脸进行跟踪。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>image </th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 输入的图像数据</th>
</tr>
<tr>
<th>返回值 </th>
<th>SeetaTrackingFaceInfoArray </th>
<th> </th>
<th> 跟踪到的人脸信息数组 </th>
</tr>
<table>
<br>
#### Track
对视频帧中的人脸进行跟踪。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>image </th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 输入的图像数据</th>
</tr>
<tr>
<th>frame_no </th>
<th> int</th>
<th> </th>
<th> 视频帧索引</th>
</tr>
<tr>
<th>返回值 </th>
<th>SeetaTrackingFaceInfoArray </th>
<th> </th>
<th> 跟踪到的人脸信息数组 </th>
</tr>
<table>
<br>
#### SetMinFaceSize
设置检测器的最小人脸大小。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>size </th>
<th>int32_t </th>
<th> </th>
<th> 最小人脸大小</th>
</tr>
<tr>
<th> 返回值</th>
<th> void</th>
<th> </th>
<th> </th>
</tr>
<table>
<br>
说明:size 的大小保证大于等于20,size的值越小,能够检测到的人脸的尺寸越小,检测速度越慢。<br>
#### GetMinFaceSize
获取最小人脸的大小。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> 返回值</th>
<th> int32_t</th>
<th> </th>
<th> 最小人脸大小</th>
</tr>
<table>
<br>
#### SetThreshold
设置检测器的检测阈值。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> thresh</th>
<th> float</th>
<th> </th>
<th> 检测阈值</th>
</tr>
<tr>
<th> 返回值</th>
<th> void</th>
<th> </th>
<th> </th>
</tr>
<table>
<br>
#### GetScoreThreshold
获取检测器检测阈值。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> 返回值</th>
<th> float</th>
<th> </th>
<th> 检测阈值</th>
</tr>
<table>
<br>
#### SetVideoStable
设置以稳定模式输出人脸跟踪结果。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> stable</th>
<th> bool</th>
<th> </th>
<th> 是否是稳定模式</th>
</tr>
<tr>
<th> 返回值</th>
<th> void</th>
<th> </th>
<th> </th>
</tr>
<table>
<br>
说明:只有在视频中连续跟踪时,才使用此方法。<br>
#### GetVideoStable
获取当前是否是稳定工作模式。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> 返回值</th>
<th> bool</th>
<th> </th>
<th> 是否是稳定模式</th>
</tr>
<table>
<br>
\ No newline at end of file
# 人脸特征点检测器
# 人脸特征点检测器
## **1. 接口简介** <br>
人脸特征点检测器要求输入原始图像数据和人脸位置,返回人脸 5 个或者其他数量的的特征点的坐标(特征点的数量和加载的模型有关)。<br>
## **2. 类型说明**<br>
### **2.1 struct SeetaImageData**<br>
<table border="1">
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<th>data</th>
<th>uint8_t*</th>
<th>图像数据</th>
</tr>
<tr>
<th>width</th>
<th>int32_t</th>
<th>图像的宽度</th>
</tr>
<tr>
<th>height</th>
<th>int32_t</th>
<th>图像的高度</th>
</tr>
<tr>
<th>channels</th>
<th>int32_t</th>
<th>图像的通道数</th>
</tr>
</table>
<br>
说明:存储彩色(三通道)或灰度(单通道)图像,像素连续存储,行优先,采用 BGR888 格式存放彩色图像,单字节灰度值存放灰度图像。<br>
### **2.2 struct SeetaRect**<br>
<table border="1">
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<th>x</th>
<th>int32_t</th>
<th>人脸区域左上角横坐标</th>
</tr>
<tr>
<th>y</th>
<th>int32_t</th>
<th>人脸区域左上角纵坐标</th>
</tr>
<tr>
<th>width</th>
<th>int32_t</th>
<th>人脸区域宽度</th>
</tr>
<tr>
<th>height</th>
<th>int32_t</th>
<th>人脸区域高度</th>
</tr>
</table>
<br>
### **2.3 struct SeetaPointF**<br>
<table border="1">
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<th> x</th>
<th> double</th>
<th>人脸特征点横坐标 </th>
</tr>
<tr>
<th> y</th>
<th> double</th>
<th> 人脸特征点纵坐标</th>
</tr>
</table>
<br>
## 3 class FaceLandmarker
人脸特征点检测器。<br>
### 3.1 Enum SeetaDevice
模型运行的计算设备。<br>
<table border="1">
<tr>
<th>名称</th>
<th>说明</th>
</tr>
<tr>
<th>SEETA_DEVICE_AUTO </th>
<th>自动检测,会优先使用 GPU </th>
</tr>
<tr>
<th> SEETA_DEVICE_CPU</th>
<th> 使用CPU计算</th>
</tr>
<tr>
<th>SEETA_DEVICE_GPU </th>
<th>使用GPU计算 </th>
</tr>
</table>
<br>
### 3.2 struct SeetaModelSetting
构造人脸特征点检测器需要传入的结构体参数。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> model</th>
<th> const char**</th>
<th> </th>
<th> 检测器模型</th>
</tr>
<tr>
<th> id</th>
<th> int</th>
<th> </th>
<th> GPU id</th>
</tr>
<tr>
<th> device</th>
<th> SeetaDevice</th>
<th> AUTO</th>
<th> 计算设备(CPU 或者 GPU)</th>
</tr>
<table>
<br>
### 3.3 构造函数
#### FaceLandmarker
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> setting</th>
<th> const SeetaModelSetting&</th>
<th> </th>
<th> 检测器结构参数</th>
</tr>
<table>
<br>
### 3.4 成员函数
#### number
获取模型对应的特征点数组长度。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> 返回值</th>
<th> int</th>
<th> </th>
<th> 模型特征点数组长度</th>
</tr>
<table>
<br>
#### mark
获取人脸特征点。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> image</th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 图像原始数据</th>
</tr>
<tr>
<th> face</th>
<th> const SeetaRect&</th>
<th> </th>
<th> 人脸位置</th>
</tr>
<tr>
<th> points</th>
<th> SeetaPointF*</th>
<th> </th>
<th> 获取的人脸特征点数组(需预分配好数组长度,长度为number()返回的值)</th>
</tr>
<tr>
<th> 返回值</th>
<th> void</th>
<th> </th>
<th> </th>
</tr>
<table>
<br>
#### mark
获取人脸特征点和遮挡信息。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> image</th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 图像原始数据</th>
</tr>
<tr>
<th> face</th>
<th> const SeetaRect&</th>
<th> </th>
<th> 人脸位置</th>
</tr>
<tr>
<th> points</th>
<th> SeetaPointF*</th>
<th> 获取的人脸特征点数组(需预分配好数组长度,长度为number()返回的值)</th>
<th> </th>
</tr>
<tr>
<th>mask </th>
<th> int32_t</th>
<th> </th>
<th> 获取人脸特征点位置对应的遮挡信息数组(需预分配好数组长度,长度为number()返回的值), 其中值为1表示被遮挡,0表示未被遮挡</th>
</tr>
<tr>
<th> 返回值</th>
<th> void</th>
<th> </th>
<th> </th>
</tr>
<table>
<br>
#### mark
获取人脸特征点。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> image</th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 图像原始数据</th>
</tr>
<tr>
<th> face</th>
<th> const SeetaRect&</th>
<th> </th>
<th> 人脸位置</th>
</tr>
<tr>
<th> 返回值</th>
<th> std::vector<SeetaPointF> </th>
<th> </th>
<th> 获取的人脸特征点数组</th>
</tr>
<table>
<br>
#### mark_v2
获取人脸特征点和遮挡信息。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> image</th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 图像原始数据</th>
</tr>
<tr>
<th> face</th>
<th> const SeetaRect&</th>
<th> </th>
<th> 人脸位置</th>
</tr>
<tr>
<th> 返回值</th>
<th> std::vector<PointWithMask> </th>
<th> </th>
<th> 获取人脸特征点和是否遮挡数组</th>
</tr>
<table>
<br>
\ No newline at end of file
# 质量评估器
# 质量评估器
## **1. 接口简介** <br>
质量评估器包含不同的质量评估模块,包括人脸亮度、人脸清晰度(非深度方法)、人脸清晰度(深度方法)、人脸姿态(非深度方法)、人脸姿态(深度方法)、人脸分辨率评估模块。<br>
## **2. 类型说明**<br>
### **2.1 struct SeetaImageData**<br>
<table border="1">
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<th>data</th>
<th>uint8_t*</th>
<th>图像数据</th>
</tr>
<tr>
<th>width</th>
<th>int32_t</th>
<th>图像的宽度</th>
</tr>
<tr>
<th>height</th>
<th>int32_t</th>
<th>图像的高度</th>
</tr>
<tr>
<th>channels</th>
<th>int32_t</th>
<th>图像的通道数</th>
</tr>
</table>
<br>
说明:存储彩色(三通道)或灰度(单通道)图像,像素连续存储,行优先,采用 BGR888 格式存放彩色图像,单字节灰度值存放灰度图像。<br>
### **2.2 struct SeetaRect**<br>
<table border="1">
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<th>x</th>
<th>int32_t</th>
<th>人脸区域左上角横坐标</th>
</tr>
<tr>
<th>y</th>
<th>int32_t</th>
<th>人脸区域左上角纵坐标</th>
</tr>
<tr>
<th>width</th>
<th>int32_t</th>
<th>人脸区域宽度</th>
</tr>
<tr>
<th>height</th>
<th>int32_t</th>
<th>人脸区域高度</th>
</tr>
</table>
<br>
### **2.3 struct SeetaPointF**<br>
<table border="1">
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<th> x</th>
<th> double</th>
<th>人脸特征点横坐标 </th>
</tr>
<tr>
<th> y</th>
<th> double</th>
<th> 人脸特征点纵坐标</th>
</tr>
</table>
<br>
### 2.4 enum QualityLevel
<table border="1">
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<th> LOW</th>
<th> </th>
<th> 表示人脸质量为低</th>
</tr>
<tr>
<th> MEDIAUM</th>
<th> </th>
<th> 表示人脸质量为中</th>
</tr>
<tr>
<th> HIGH</th>
<th> </th>
<th> 表示人脸质量为高</th>
</tr>
</table>
<br>
### 2.5 class QualityResult
<table border="1">
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<th> level</th>
<th> QualityLevel</th>
<th> 人脸质量等级</th>
</tr>
<tr>
<th> score</th>
<th> float</th>
<th> 人脸质量分数</th>
</tr>
</table>
<br>
## 3 class QualityOfBrightness
非深度的人脸亮度评估器。<br>
### 3.1 构造函数
#### QualityOfBrightness
人脸亮度评估器构造函数。<br>
#### QualityOfBrightness
人脸亮度评估器构造函数。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> v0</th>
<th> float</th>
<th> </th>
<th> 分级参数一</th>
</tr>
<tr>
<th> v1</th>
<th> float</th>
<th> </th>
<th> 分级参数二</th>
</tr>
<tr>
<th> v2</th>
<th> float</th>
<th> </th>
<th> 分级参数三</th>
</tr>
<tr>
<th> v3</th>
<th> float</th>
<th> </th>
<th> 分级参数三</th>
</tr>
<table>
<br>
说明:说明:分类依据为[0, v0) and [v3, ~) => LOW;[v0, v1) and [v2, v3) =>MEDIUM;[v1, v2) => HIGH。<br>
### 3.2 成员函数
#### check
检测人脸亮度。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> image</th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 原始图像数据</th>
</tr>
<tr>
<th> face</th>
<th> const SeetaRect&</th>
<th> </th>
<th> 人脸位置</th>
</tr>
<tr>
<th> points</th>
<th> const SeetaPointF*</th>
<th> </th>
<th> 人脸5个特征点数组</th>
</tr>
<tr>
<th> N</th>
<th> const int32_t</th>
<th> </th>
<th> 人脸特征点数组长度</th>
</tr>
<tr>
<th> 返回值</th>
<th> QualityResult</th>
<th> </th>
<th> 人脸亮度检测结果</th>
</tr>
<table>
<br>
## 4 class QualityOfClarity
非深度学习的人脸清晰度评估器。<br>
### 4.1 构造函数
#### QualityOfClarity
人脸清晰度评估器构造函数。<br>
#### QualityOfClarity
人脸清晰度评估器构造函数。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> low</th>
<th> float</th>
<th> </th>
<th> 分级参数一</th>
</tr>
<tr>
<th> high</th>
<th> float</th>
<th> </th>
<th> 分级参数二</th>
</tr>
<table>
<br>
说明:分类依据为[0, low)=> LOW; [low, high)=> MEDIUM; [high, ~)=> HIGH。<br>
### 4.2 成员函数
#### check
检测人脸清晰度。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> image</th>
<th> const SeetaImageData &</th>
<th> </th>
<th>原始图像数据 </th>
</tr>
<tr>
<th> face</th>
<th> const SeetaRect&</th>
<th> </th>
<th> 人脸位置</th>
</tr>
<tr>
<th> points</th>
<th> const SeetaPointF*</th>
<th> </th>
<th> 人脸5个特征点数组</th>
</tr>
<tr>
<th> N</th>
<th> const int32_t</th>
<th> </th>
<th> 人脸特征点数组长度</th>
</tr>
<tr>
<th> 返回值</th>
<th> QualityResult</th>
<th> </th>
<th>人脸清晰度检测结果 </th>
</tr>
<table>
<br>
## 5 class QualityOfLBN
深度学习的人脸清晰度评估器。<br>
### 5.1 Enum SeetaDevice
模型运行的计算设备。<br>
<table border="1">
<tr>
<th>名称</th>
<th>说明</th>
</tr>
<tr>
<th>SEETA_DEVICE_AUTO</th>
<th>自动检测,会优先使用 GPU</th>
</tr>
<tr>
<th>SEETA_DEVICE_CPU</th>
<th>使用CPU计算</th>
</tr>
<tr>
<th>SEETA_DEVICE_GPU</th>
<th>使用GPU计算</th>
</tr>
<table>
<br>
### 5.2 struct SeetaModelSetting
构造评估器需要传入的结构体参数。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>model</th>
<th>const char**</th>
<th></th>
<th>检测器模型</th>
</tr>
<tr>
<th>id</th>
<th>int</th>
<th></th>
<th>GPU id</th>
</tr>
<tr>
<th>device</th>
<th>SeetaDevice</th>
<th>AUTO</th>
<th>计算设备(CPU 或者 GPU)</th>
</tr>
<table>
<br>
### 5.3 构造函数
人脸清晰度评估器构造函数。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> setting</th>
<th> const SeetaModelSetting&</th>
<th> </th>
<th> 对象构造结构体参数</th>
</tr>
<table>
<br>
### 5.4 成员函数
#### Detect
检测人脸清晰度。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> image</th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 原始图像数据</th>
</tr>
<tr>
<th> points</th>
<th> const SeetaPointF*</th>
<th> </th>
<th> 人脸68个特征点数组 </th>
</tr>
<tr>
<th> light</th>
<th> int*</th>
<th> </th>
<th> 亮度返回结果,暂不推荐使用该返回结果</th>
</tr>
<tr>
<th> blur</th>
<th> int*</th>
<th> </th>
<th> 模糊度返回结果</th>
</tr>
<tr>
<th> noise</th>
<th> int*</th>
<th> </th>
<th> 是否有噪声返回结果,暂不推荐使用该返回结果</th>
</tr>
<tr>
<th> 返回值</th>
<th> void</th>
<th> </th>
<th> </th>
</tr>
<table>
<br>
说明:blur 结果返回 0 说明人脸是清晰的,blur 为 1 说明人脸是模糊的。<br>
#### set
设置人脸检测器相关属性值。其中<br>
**PROPERTY_NUMBER_THREADS**:
表示计算线程数,默认为 4。<br>
**PROPERTY_ARM_CPU_MODE**:针对于移动端,表示设置的 cpu 计算模式。0 表示
大核计算模式,1 表示小核计算模式,2 表示平衡模式,为默认模式。<br>
**PROPERTY_BLUR_THRESH**:表示人脸模糊阈值,默认值大小为 0.80。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>property </th>
<th>Property </th>
<th> </th>
<th> 人脸检测器属性类别</th>
</tr>
<tr>
<th> value</th>
<th> double</th>
<th> </th>
<th> 设置的属性值 </th>
</tr>
<tr>
<th> 返回值</th>
<th>void </th>
<th> </th>
<th> </th>
</tr>
<table>
<br>
#### get
获取人脸检测器相关属性值。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>property </th>
<th> Property</th>
<th> </th>
<th> 人脸检测器属性类别</th>
</tr>
<tr>
<th> 返回值</th>
<th>double </th>
<th> </th>
<th> 对应的人脸属性值 </th>
</tr>
<table>
<br>
## 6 class QualityOfPose
非深度学习的人脸姿态评估器。<br>
### 6.1 构造函数
#### QualityOfPose
人脸姿态评估器构造函数。<br>
### 6.2 成员函数
#### check
检测人脸姿态。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> image</th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 原始图像数据</th>
</tr>
<tr>
<th> face</th>
<th> const SeetaRect&</th>
<th> </th>
<th> 人脸位置</th>
</tr>
<tr>
<th> points</th>
<th> const SeetaPointF*</th>
<th> </th>
<th> 人脸5个特征点数组</th>
</tr>
<tr>
<th> N</th>
<th> const int32_t</th>
<th> </th>
<th>人脸特征点数组长度 </th>
</tr>
<tr>
<th> 返回值</th>
<th> QualityResult</th>
<th> </th>
<th>人脸姿态检测结果 </th>
</tr>
<table>
<br>
## 7 class QualityOfPoseEx
深度学习的人脸姿态评估器。<br>
### 7.1 Enum SeetaDevice
模型运行的计算设备。<br>
<table border="1">
<tr>
<th>名称</th>
<th>说明</th>
</tr>
<tr>
<th>SEETA_DEVICE_AUTO</th>
<th>自动检测,会优先使用 GPU</th>
</tr>
<tr>
<th>SEETA_DEVICE_CPU</th>
<th>使用CPU计算</th>
</tr>
<tr>
<th>SEETA_DEVICE_GPU</th>
<th>使用GPU计算</th>
</tr>
<table>
<br>
### 7.2 struct SeetaModelSetting
构造评估器需要传入的结构体参数。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>model</th>
<th>const char**</th>
<th></th>
<th>检测器模型</th>
</tr>
<tr>
<th>id</th>
<th>int</th>
<th></th>
<th>GPU id</th>
</tr>
<tr>
<th>device</th>
<th>SeetaDevice</th>
<th>AUTO</th>
<th>计算设备(CPU 或者 GPU)</th>
</tr>
<table>
<br>
### 7.3 构造函数
#### QualityOfPoseEx
人脸姿态评估器构造函数。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> setting</th>
<th> const SeetaModelSetting&</th>
<th> </th>
<th> 对象结构体参数</th>
</tr>
<table>
<br>
### 7.4 成员函数
#### check
检测人脸姿态。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> image</th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 原始图像数据</th>
</tr>
<tr>
<th> face</th>
<th> const SeetaRect&</th>
<th> </th>
<th> 人脸位置</th>
</tr>
<tr>
<th> points</th>
<th> const SeetaPointF*</th>
<th> </th>
<th> 人脸5个特征点数组</th>
</tr>
<tr>
<th> N</th>
<th> const int32_t</th>
<th> </th>
<th> 人脸特征点数组长度</th>
</tr>
<tr>
<th> 返回值</th>
<th> QualityResult</th>
<th> </th>
<th> 人脸姿态检测结果</th>
</tr>
<table>
<br>
#### check
检测人脸姿态。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> image</th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 原始图像数据</th>
</tr>
<tr>
<th> face</th>
<th> const SeetaRect&</th>
<th> </th>
<th> 人脸位置</th>
</tr>
<tr>
<th> points</th>
<th> const SeetaPointF*</th>
<th> </th>
<th> 人脸5个特征点数组</th>
</tr>
<tr>
<th> N</th>
<th> const int32_t</th>
<th> </th>
<th> 人脸特征点数组长度</th>
</tr>
<tr>
<th> yaw</th>
<th> float&</th>
<th> </th>
<th> yaw方向上的角度</th>
</tr>
<tr>
<th> pitch</th>
<th> float&</th>
<th> </th>
<th> pitch方向上的角度</th>
</tr>
<tr>
<th> roll</th>
<th> float&</th>
<th> </th>
<th> roll方向上的角度</th>
</tr>
<tr>
<th> 返回值</th>
<th> bool</th>
<th> </th>
<th> true为检测成功</th>
</tr>
<table>
<br>
#### set
设置相关属性值。其中<br>
**YAW_HIGH_THRESHOLD**:
yaw方向的分级参数一。<br>
**YAW_LOW_THRESHOLD**:
yaw方向的分级参数二。<br>
**PITCH_HIGH_THRESHOLD**
pitch方向的分级参数一。<br>
**PITCH_LOW_THRESHOLD**
pitch方向的分级参数二。<br>
**ROLL_HIGH_THRESHOLD**
roll方向的分级参数一。<br>
**ROLL_LOW_THRESHOLD**
roll方向的分级参数二。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>property </th>
<th>Property </th>
<th> </th>
<th> 人脸检测器属性类别</th>
</tr>
<tr>
<th> value</th>
<th> double</th>
<th> </th>
<th> 设置的属性值 </th>
</tr>
<tr>
<th> 返回值</th>
<th>void </th>
<th> </th>
<th> </th>
</tr>
<table>
<br>
#### get
获取人脸检测器相关属性值。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>property </th>
<th> Property</th>
<th> </th>
<th> 人脸检测器属性类别</th>
</tr>
<tr>
<th> 返回值</th>
<th>double </th>
<th> </th>
<th> 对应的人脸属性值 </th>
</tr>
<table>
<br>
## 8 class QualityOfResolution
非深度学习的人脸尺寸评估器。<br>
### 8.1 构造函数
#### QualityOfResolution
人脸尺寸评估器构造函数。<br>
#### QualityOfResolution
人脸尺寸评估器构造函数。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> low</th>
<th> float</th>
<th> </th>
<th> 分级参数一</th>
</tr>
<tr>
<th> high</th>
<th> float</th>
<th> </th>
<th> 分级参数二</th>
</tr>
<table>
<br>
### 8.2 成员函数
#### check
评估人脸尺寸。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> image</th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 原始图像数据</th>
</tr>
<tr>
<th> face</th>
<th> const SeetaRect&</th>
<th> </th>
<th> 人脸位置</th>
</tr>
<tr>
<th> points</th>
<th> const SeetaPointF*</th>
<th> </th>
<th> 人脸5个特征点数组</th>
</tr>
<tr>
<th> N</th>
<th> const int32_t</th>
<th> </th>
<th> 人脸特征点数组长度</th>
</tr>
<tr>
<th> 返回值</th>
<th> QualityResult</th>
<th> </th>
<th> 人脸尺寸评估结果</th>
</tr>
<table>
<br>
\ No newline at end of file
# 近红外活体识别器
# 近红外活体识别器
## **1. 接口简介** <br>
近红外活体识别根据输入的近红外图像数据、人脸位置和人脸特征点,对输入人脸进行活体的判断,并返回人脸活体的状态。<br>
## **2. 类型说明**<br>
### **2.1 struct SeetaImageData**<br>
<table border="1">
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<th>data</th>
<th>uint8_t*</th>
<th>图像数据</th>
</tr>
<tr>
<th>width</th>
<th>int32_t</th>
<th>图像的宽度</th>
</tr>
<tr>
<th>height</th>
<th>int32_t</th>
<th>图像的高度</th>
</tr>
<tr>
<th>channels</th>
<th>int32_t</th>
<th>图像的通道数</th>
</tr>
</table>
<br>
说明:存储彩色(三通道)或灰度(单通道)图像,像素连续存储,行优先,采用 BGR888 格式存放彩色图像,单字节灰度值存放灰度图像。<br>
### **2.2 struct SeetaRect**<br>
<table border="1">
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<th>x</th>
<th>int32_t</th>
<th>人脸区域左上角横坐标</th>
</tr>
<tr>
<th>y</th>
<th>int32_t</th>
<th>人脸区域左上角纵坐标</th>
</tr>
<tr>
<th>width</th>
<th>int32_t</th>
<th>人脸区域宽度</th>
</tr>
<tr>
<th>height</th>
<th>int32_t</th>
<th>人脸区域高度</th>
</tr>
</table>
<br>
### **2.3 struct SeetaPointF**<br>
<table border="1">
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<th> x</th>
<th> double</th>
<th>人脸特征点横坐标 </th>
</tr>
<tr>
<th> y</th>
<th> double</th>
<th> 人脸特征点纵坐标</th>
</tr>
</table>
<br>
## 3 class SeetaNirFaceAntiSpoofing
近红外活体识别器。<br>
### 3.1 Enum SeetaDevice
模型运行的计算设备。<br>
<table border="1">
<tr>
<th>名称</th>
<th>说明</th>
</tr>
<tr>
<th>SEETA_DEVICE_AUTO </th>
<th>自动检测,会优先使用 GPU </th>
</tr>
<tr>
<th> SEETA_DEVICE_CPU</th>
<th> 使用CPU计算</th>
</tr>
<tr>
<th>SEETA_DEVICE_GPU </th>
<th>使用GPU计算 </th>
</tr>
</table>
<br>
### 3.2 struct SeetaModelSetting
构造活体识别器需要传入的结构体参数。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> model</th>
<th> const char**</th>
<th> </th>
<th> 识别器模型</th>
</tr>
<tr>
<th> id</th>
<th> int</th>
<th> </th>
<th> GPU id</th>
</tr>
<tr>
<th> device</th>
<th> SeetaDevice</th>
<th> AUTO</th>
<th> 计算设备(CPU 或者 GPU)</th>
</tr>
<table>
<br>
### 3.3 构造函数
#### SeetaNirFaceAntiSpoofing
构造活体识别器,需要在构造的时候传入识别器结构参数。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> setting</th>
<th> const SeetaModelSetting&</th>
<th> </th>
<th> 识别器接口参数</th>
</tr>
<table>
<br>
### 3.4 成员函数
#### predict
基于单帧图像对人脸是否为活体进行判断。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> image</th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 原始图像数据</th>
</tr>
<tr>
<th> face</th>
<th> const SeetaRect&</th>
<th> </th>
<th> 人脸位置</th>
</tr>
<tr>
<th> points</th>
<th> const SeetaPointF*</th>
<th> </th>
<th> 人脸特征点数组</th>
</tr>
<tr>
<th> 返回值</th>
<th> Status</th>
<th> </th>
<th> 人脸活体的状态</th>
</tr>
<table>
<br>
说明:Status 活体状态可取值为REAL(真人)、SPOOF(假体)、FUZZY(由于图像质量问题造成的无法判断)和 DETECTING(正在检测),DETECTING 状态针对于 PredicVideo 模式。<br>
#### predictVideo
基于连续视频序列对人脸是否为活体进行判断。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> image</th>
<th> const SeetaImageData&</th>
<th> </th>
<th> 原始图像数据</th>
</tr>
<tr>
<th> face</th>
<th> const SeetaRect&</th>
<th> </th>
<th> 人脸位置</th>
</tr>
<tr>
<th> points</th>
<th> const SeetaPointF*</th>
<th> </th>
<th> 人脸特征点数组</th>
</tr>
<tr>
<th> 返回值</th>
<th> Status</th>
<th> </th>
<th> 人脸活体的状态</th>
</tr>
<table>
<br>
说明:Status 活体状态可取值为REAL(真人)、SPOOF(假体)、FUZZY(由于图像质量问题造成的无法判断)和 DETECTING(正在检测),DETECTING 状态针对于 PredicVideo 模式。<br>
#### resetVideo
重置活体识别结果,开始下一次 predictVideo 识别过程。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> 返回值</th>
<th> void</th>
<th> </th>
<th> </th>
</tr>
<table>
<br>
#### GetPreFasScore
获取活体检测内部分数。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> 返回值</th>
<th> double</th>
<th> </th>
<th> 活体分数</th>
</tr>
<table>
<br>
#### SetFrameNumForVideo
设置 Video 模式中识别视频帧数,当输入帧数为该值以后才会有活体的
真假结果。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> frameNumForVideo</th>
<th> const int</th>
<th> </th>
<th> video模式下活体需求帧数</th>
</tr>
<table>
<br>
#### GetVideoFrameCount
获取video模式下活体需求帧数。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th> 返回值</th>
<th> int</th>
<th> </th>
<th> video模式下活体需求帧数</th>
</tr>
<table>
<br>
#### set
设置人脸检测器相关属性值。其中<br>
**PROPERTY_NUMBER_THREADS**:
表示人脸检测器计算线程数,默认为 4.<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>property </th>
<th>Property </th>
<th> </th>
<th> 人脸检测器属性类别</th>
</tr>
<tr>
<th> value</th>
<th> double</th>
<th> </th>
<th> 设置的属性值 </th>
</tr>
<tr>
<th> 返回值</th>
<th>void </th>
<th> </th>
<th> </th>
</tr>
<table>
<br>
#### get
获取人脸检测器相关属性值。<br>
<table border="1">
<tr>
<th>参数</th>
<th>类型</th>
<th>缺省</th>
<th>说明</th>
</tr>
<tr>
<th>property </th>
<th> Property</th>
<th> </th>
<th> 人脸检测器属性类别</th>
</tr>
<tr>
<th> 返回值</th>
<th>double </th>
<th> </th>
<th> 对应的人脸属性值 </th>
</tr>
<table>
<br>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!