dev
houxiao
2017-04-21 f757a27218a09fd24a852f34b6490d32fe237017
FaceServer/STFaceCache.h
@@ -4,15 +4,7 @@
#include <string>
#include "face_daemon_proto.h"
struct STFaceImage
{
   int32_t db_id;
   int16_t mb_type; // MB_Frame::MBFType
   int16_t width;
   int16_t height;
   uint32_t size;
   const uint8_t* buff;
};
struct STFaceImage;
class STFaceCache
{
@@ -20,13 +12,21 @@
   STFaceCache(const std::string& _stfacedbPath);
   ~STFaceCache();
   
   bool init();
   void finit();
   bool load_dbs();
   void close_dbs();
   FDP_FaceDetectResult detect(const STFaceImage& img);
   FDP_FaceDetectResult save(const STFaceImage& img);
   FDP_FaceDetectResult add(const STFaceImage& img);
   //#todo need a delete img, if business not linked faceid and its personid
   // they can delete it and save/find again!
   
private:
   const std::string stfacedbPath;
   const std::string stfaceModels;
   void* _dbContext;
   void* _cacheContext;
};