Files
webcamservice/FaceDef.h
2024-12-15 16:18:16 +08:00

30 lines
587 B
C

#ifndef __DEEPCAM_DEF_H
#define __DEEPCAM_DEF_H
#define ERR_OK 0 // 操作成功
#define ERR_AUTHOR -1 // 授权失败
#define ERR_IMG -2 // 输入图片错误
#define ERR_FEATURE -3 // 人脸特征值无效
#define ERR_LANDMARK -4 // 人脸Landmark无效
#define ERR_FACE_RECT -10 //人脸框无效
#define ERR_INDEX_INVALID -20 //索引无效
struct FaceInfo {
float x1;
float y1;
float x2;
float y2;
float score;
float landmarks[10];
int GetWidth() {
return static_cast<int>(x2 - x1);
}
int GetHeight() {
return static_cast<int>(y2 - y1);
}
};
#endif