| | |
| | | #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 |
| | | { |
| | |
| | | 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; |
| | | }; |
| | | |