#ifndef _FACE_DAEMON_PROTO_H_
|
#define _FACE_DAEMON_PROTO_H_
|
|
#include <stddef.h>
|
#include <stdint.h>
|
#include "ev_proto.h"
|
|
#include <vector>
|
|
#pragma pack(1)
|
|
struct FaceDaemonCommand
|
{
|
enum FDC
|
{
|
FDC__FIRST,
|
FDC_SENSETIMEFACEDETECT = EVPCommand::EVPC_USER_DEFINE + 1, // 129
|
FDC_SENSETIMEFACEDETECT_RESULT,
|
FDC_SENSETIMEFACEDETECT_PB,
|
FDC_SENSETIMEFACEDETECT_RESULT_JSON,
|
FDC_SENSETIMEFACEDETECT_SAVE,
|
FDC_SENSETIMEFACEDETECT_COMPARE,
|
FDC_SENSETIMEFACEDETECT_SEARCH,
|
FDC__LAST,
|
};
|
};
|
|
struct FDP_Image
|
{
|
int32_t db_id;
|
int16_t mb_type; // MB_Frame::MBFType
|
int16_t width;
|
int16_t height;
|
int16_t size;
|
uint8_t buff[0];
|
|
void hton();
|
void ntoh();
|
};
|
//sizeof(FDP_Image)=10
|
|
struct FDP_FaceDetectPB
|
{
|
int32_t db_id;
|
int16_t camera_id;
|
|
FDP_FaceDetectPB(int32_t _db_id, int16_t _camera_id) : db_id(_db_id), camera_id(_camera_id)
|
{}
|
|
void hton();
|
void ntoh();
|
};
|
|
struct FDP_FaceDetectResult
|
{
|
int32_t db_id;
|
int32_t st_id; // sensetime id
|
int16_t confidence; // 1000 times of float confidence, less than zero means error
|
|
int16_t camera_id;
|
int32_t st_track_id;
|
|
FDP_FaceDetectResult(int32_t _db_id, int32_t _st_id, int _confidence) :
|
db_id(_db_id), st_id(_st_id), confidence(_confidence), camera_id(0), st_track_id(0)
|
{}
|
|
void hton();
|
void ntoh();
|
};
|
|
#pragma pack()
|
|
typedef std::vector<FDP_FaceDetectResult> fdr_vec_t;
|
|
#endif
|