| | |
| | | using std::vector; |
| | | using std::string; |
| | | |
| | | struct FaceFeatureResult { |
| | | vector<unsigned char> feature; |
| | | float score; |
| | | }; |
| | | namespace BasicFace { |
| | | |
| | | struct FaceDetectResult { |
| | | FaceDetectResult() : attributes(256), trackingId(-1) {} |
| | | typedef vector<unsigned char> Feature; |
| | | |
| | | int id; |
| | | int left; |
| | | int top; |
| | | int width; |
| | | int height; |
| | | float score; |
| | | float yaw; // 水平转角,真实度量的左负右正, 单位,角度 |
| | | float pitch; // 俯仰角,真实度量的上负下正, 单位,角度 |
| | | float roll; // 旋转角,真实度量的左负右正, 单位,角度 |
| | | float angle; // sqrt(yaw*yaw/3+pitch*pitch/3+roll*roll/3) |
| | | vector<char> attributes; |
| | | float trackingId; |
| | | }; |
| | | |
| | | struct DbSearchResult { |
| | | int index; |
| | | float confidence; |
| | | string dbId; |
| | | }; |
| | | struct InitParam { |
| | | int nDeviceID;//device id for GPU device.eg:0,1,2,3..... |
| | | |
| | | struct FaceSearchResult { |
| | | int index; |
| | | int left; |
| | | int top; |
| | | int width; |
| | | int height; |
| | | float score; |
| | | float confidence; |
| | | string dbId; |
| | | }; |
| | | int nImageWidth;//image width of video |
| | | int nImageHeight;//image height of video |
| | | int nMaxFaceNum;//max face number for tracking |
| | | int nSampleSize;//down sample size for face detection |
| | | int nDetectionIntervalFrame;//interval frame number of face detection for face tracking |
| | | |
| | | struct FaceImage { |
| | | int width; |
| | | int height; |
| | | int stride; |
| | | unsigned char *data; |
| | | }; |
| | | InitParam() { |
| | | nMaxFaceNum = 100; |
| | | nSampleSize = 640; |
| | | nDeviceID = 0; |
| | | nDetectionIntervalFrame = 5; |
| | | } |
| | | }; |
| | | |
| | | struct FaceFeatureResult { |
| | | Feature feature; |
| | | float score; |
| | | }; |
| | | |
| | | struct FaceDetectResult { |
| | | FaceDetectResult() : attributes(256), trackingId(-1) {} |
| | | |
| | | int id; |
| | | int left; |
| | | int top; |
| | | int width; |
| | | int height; |
| | | float score; |
| | | float yaw; // 水平转角,真实度量的左负右正, 单位,角度 |
| | | float pitch; // 俯仰角,真实度量的上负下正, 单位,角度 |
| | | float roll; // 旋转角,真实度量的左负右正, 单位,角度 |
| | | float angle; // sqrt(yaw*yaw/3+pitch*pitch/3+roll*roll/3) |
| | | vector<char> attributes; |
| | | long trackingId; |
| | | }; |
| | | |
| | | struct DbSearchResult { |
| | | int index; |
| | | float confidence; |
| | | string dbId; |
| | | }; |
| | | |
| | | struct FaceSearchResult { |
| | | int index; |
| | | int left; |
| | | int top; |
| | | int width; |
| | | int height; |
| | | float score; |
| | | float confidence; |
| | | string dbId; |
| | | }; |
| | | |
| | | struct FaceImage { |
| | | int width; |
| | | int height; |
| | | int stride; |
| | | unsigned char *data; |
| | | }; |
| | | |
| | | } |
| | | |
| | | #endif //TESTCODE_FACEDEFINE_H |