qvyuanxin
2017-07-04 65a094bd57829118503802220b7125053c643c41
FaceServer/face_daemon_proto.h
@@ -19,18 +19,25 @@
      FDC_SENSETIMEFACEDETECT_PB,
      FDC_SENSETIMEFACEDETECT_RESULT_JSON,
      FDC_SENSETIMEFACEDETECT_SAVE,
      FDC_SENSETIMEFACEDETECT_COMPARE,
      FDC_SENSETIMEFACEDETECT_SEARCH,
      FDC__LAST,
   };
};
struct FDP_Image
{
   int32_t school_id;
   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
{
@@ -38,15 +45,22 @@
   
   FDP_FaceDetectPB(int32_t _db_id) : db_id(_db_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
   
   FDP_FaceDetectResult(int32_t _db_id, int32_t _st_id) : db_id(_db_id), st_id(_st_id)
   FDP_FaceDetectResult(int32_t _db_id, int32_t _st_id, int _confidence) : db_id(_db_id), st_id(_st_id), confidence(_confidence)
   {}
   void hton();
   void ntoh();
};
#pragma pack()