# SmartPose
**Repository Path**: UESTCBMC/Smart_Classroom
## Basic Information
- **Project Name**: SmartPose
- **Description**: 智慧课堂
- **Primary Language**: C++
- **License**: Not specified
- **Default Branch**: linux
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 2
- **Forks**: 0
- **Created**: 2018-01-23
- **Last Updated**: 2021-07-15
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
3rdparty 依赖程序
* caffe https://github.com/Microsoft/caffe
* OpenPose https://github.com/CMU-Perceptual-Computing-Lab/openpose
* tensorflow https://github.com/tensorflow/tensorflow
* libemgucv3.4.1.2976 https://sourceforge.net/projects/emgucv/
* HCNetSDK https://www.hikvision.com/cn/download_more_570.html
* opencv3.4.1 https://github.com/opencv/opencv
* freeglut_2018_01_14.zip http://posefs1.perception.cs.cmu.edu/OpenPose/3rdparty/windows/freeglut_2018_01_14.zip
* caffe3rdparty_2017_07_14.zip http://posefs1.perception.cs.cmu.edu/OpenPose/3rdparty/windows/caffe3rdparty_2017_07_14.zip
VS2017 Nuget程序包依赖
* NupenGL->libopenpose
* Newtonsoft.Json->Succer Challenge
非网络模式系统运行流程

非网络模式API调用流程

## C++ API 外部接口文档
```C++
/**
* 摄像头服务开启
* Start Camera Service
* @param service ptr
* @return bool
*/
WIN_API_C bool start_service(cpp2cs::Service *service);
```
```C++
/**
* Caffe服务开启
* Start Caffe Service
* @param service ptr
* @return bool
*/
WIN_API_C bool start_caffe_service(cpp2cs::Service *service);
```
```C++
/**
* 海康威视摄像头服务初始化
* Initation HKVersion Cam Camera
* @param address 摄像头IP地址
* @param username 摄像头用户名
* @param password 摄像头密码
* @param port 摄像头流端口
* @param chanel 摄像头通道
* @param id 摄像头id camera id
* @param fps 摄像头帧率 camera fps
* @param width 摄像头图像宽度(-1则为源大小) camera picture width
* @param height 摄像头图像高度(-1则为源大小) camera picture height
* @return port ptr
*/
WIN_API_C lib::cpp2cs::Service *init_hkv_camera_service(char *address, char* username, char *password, int port,int chanel, int id, int fps, int timeout, int width, int heigh);
```
```C++
/**
* USB摄像头服务初始化
* Initation HKVersion Cam Camera
* @param index 摄像头目录 camera index
* @param id 摄像头id camera id
* @param fps 摄像头帧率 camera fps
* @param width 摄像头图像宽度(-1则为源大小) camera picture width
* @param height 摄像头图像高度(-1则为源大小) camera picture height
* @return service ptr
*/
WIN_API_C lib::cpp2cs::Service *init_capture_service(int index, int id,int fps, int timeout, int width,int heigh);
```
```C++
/**
* 获取Caffe服务数量
* Get Caffe Service number
* @return int
*/
WIN_API_C int get_detcet_service_num();
```
```C++
/**
* 获取图像队列数量
* Get the number of stream queue
* @return
*/
WIN_API_C int get_stream_image_message_queue_num();
```
```C++
/**
* 获取识别队列数量
* Get the number of detcet queue
* @return int
*/
WIN_API_C int get_detcet_image_message_queue_num();
```
```C++
/**
* 获取摄像头数量
* Get the number of camera queue
* @return int
*/
WIN_API_C int get_camera_num();
```
```C++
/**
* 发送带字符参数指令
* Send special command
* @param id
* @param message_type
* @param video_path
* @param video_name
* @param picture_path
* @param picture_name
* @return
*/
WIN_API_C int send_command(int id, int message_type, char *video_path = nullptr, char *video_name = nullptr, char *picture_path = nullptr, char *picture_name = nullptr);
```
```C++
/**
* 获取用户消息队列
* Get origin stream image
* @param id 摄像头ID Camera ID
* @return
*/
WIN_API_C char* get_user_message(int id);
```
```C++
/**
* 发送基本命令
* Send base command
* @param id
* @param command
* @return
*/
WIN_API_C int send_base_command(int id,int command);
```
```C++
/**
* 获取识别图像
* Get detcet image
* @param id 摄像头ID
* @param width 摄像头宽度
* @param height 摄像头高度
* @param chanel 摄像头图像通道数
* @param step 摄像头图像深度
* @return
*/
WIN_API_C u_char *pop_detcet_image(int id, int &width, int &height, int &chanel, int &step);
```
```C++
/**
* 获取流图像
* Get origin stream image
* @param id 摄像头ID Camera ID
* @param width 摄像头宽度 Camera Picture Width
* @param height 摄像头高度 Camera Picture Height
* @param chanel 摄像头图像通道数 Camera Picture Chanel
* @param step 摄像头图像深度 Camera Picture Depth
* @return
*/
WIN_API_C u_char *pop_stream_image(int id, int &width,int &height,int &chanel,int &step);
```
```C++
/**
* 释放全部摄像头
* Release all camera
* @return
*/
WIN_API_C bool release_camera();
```
```C++
/**
* 释放IO阻塞
* Release all camera
* @return
*/
WIN_API_C void reset_singal(int id);
```
```C++
/**
* 打开IO阻塞
* Release all camera
* @return
*/
WIN_API_C void set_singal(int id);
```
### C# 外部接口文档
```C#
///