| | |
| | | #include "sample_face_search.h" |
| | | #include <cv_face.h> |
| | | |
| | | #define ENABLE_AUTO_CREATE_STFACEDB |
| | | |
| | | struct STFaceCacheContext |
| | | { |
| | | cv_handle_t handle_verify; |
| | |
| | | bool ret = ctx.init_db(cacheContext); |
| | | LOG_INFO << "init stface db dbid=" << ctx.dbid << ", ret=" << ret << LOG_ENDL; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | void STFaceCache::close_dbs() |
| | |
| | | } |
| | | |
| | | stface_ctx_map_t::iterator iterCtx = dbContext.find(img.db_id); |
| | | |
| | | #ifdef ENABLE_AUTO_CREATE_STFACEDB |
| | | if (iterCtx == dbContext.end()) |
| | | { |
| | | // create db |
| | |
| | | dbContext.insert(std::make_pair(ctx.dbid, ctx)); |
| | | iterCtx = dbContext.find(img.db_id); |
| | | } |
| | | #endif |
| | | |
| | | if (iterCtx == dbContext.end()) |
| | | { |