Commit 685e0ed3 by zhangbo

make table show correctly shown on html

1 parent 23a66b7f
......@@ -3,11 +3,17 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to SeetaDoc's documentation!
Welcome to Seeta's documentation!
====================================
.. toctree::
:maxdepth: 2
:caption: Contents:
人脸检测
特征点检测
人脸识别
人脸跟踪
质量评估器
近红外活体
# 人脸检测器
# 人脸检测器
......@@ -8,69 +8,189 @@
### **2.1 struct SeetaImageData**<br>
|名称 | 类型 | 说明|
|---|---|---|
|data|unit8_t* |图像数据|
|width | int32_t | 图像的宽度|
|height | int32_t | 图像的高度|
|channels | int32_t | 图像的通道数|
说明:存储彩色(三通道)或灰度(单通道)图像,像素连续存储,行优先,采用 BGR888 格式存放彩色图像,单字节灰度值存放灰度图像。
<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>
|名称 | 类型 | 说明|
|---|---|---|
|x|int32_t |人脸区域左上角横坐标|
|y| int32_t | 人脸区域左上角纵坐标|
|width| int32_t | 人脸区域宽度|
|height| int32_t | 人脸区域高度|
<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 SeetaFaceInfo**<br>
|名称 | 类型 | 说明|
|---|---|---|
|pos|SeetaRect|人脸位置|
|score|float|人脸置信分数|
### **2.4 struct SeetaFaceInfoArray**<br>
|名称 | 类型 | 说明|
|---|---|---|
|data|const SeetaFaceInfo*|人脸信息数组|
|size|int|人脸信息数组长度|
<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>
</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
人脸检测器。
人脸检测器。<br>
### 3.1 Enum SeetaDevice
模型运行的计算设备。<br>
|名称 |说明|
|---|---|
|SEETA_DEVICE_AUTO|自动检测,会优先使用 GPU|
|SEETA_DEVICE_CPU|使用CPU计算|
|SEETA_DEVICE_GPU|使用GPU计算|
<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>
|参数 | 类型 |缺省值|说明|
|---|---|---|---|
|model|const char**| |检测器模型|
|id|int| |GPU id|
|device|SeetaDevice|AUTO |计算设备(CPU 或者 GPU)|
<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 构造函数
#### FaceDetector
|参数 | 类型 |缺省值|说明|
|---|---|---|---|
|setting|const SeetaModelSetting&| |检测器结构参数|
<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 成员函数
......@@ -78,12 +198,30 @@
输入彩色图像,检测其中的人脸。<br>
|参数 | 类型 |缺省值|说明|
|---|---|---|---|
|image|const SeetaImageData&| |输入的图像数据|
|返回值|SeetaFaceInfoArray| |人脸信息数组|
<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>SeetaFaceInfoArray </th>
<th> </th>
<th> 人脸信息数组 </th>
</tr>
<table>
<br>
#### set
设置人脸检测器相关属性值。其中<br>
**PROPERTY_MIN_FACE_SIZE**: 表示人脸检测器可以检测到的最小人脸,该值越小,支持检测到的人脸尺寸越小,检测速度越慢,默认值为20;<br>
**PROPERTY_THRESHOLD**:
......@@ -91,21 +229,58 @@
**PROPERTY_MAX_IMAGE_WIDTH****PROPERTY_MAX_IMAGE_HEIGHT**:
分别表示支持输入的图像的最大宽度和高度;<br>
**PROPERTY_NUMBER_THREADS**:
表示人脸检测器计算线程数,默认为 4.
|参数 | 类型 |缺省值|说明|
|---|---|---|---|
|property|Property||人脸检测器属性类别|
|value|double||设置的属性值|
|返回值|void| | | |
表示人脸检测器计算线程数,默认为 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>
|参数 | 类型 |缺省值|说明|
|---|---|---|---|
|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 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>
## 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!