| | |
| | | ss << "\"result\":[";
|
| | | for(fdr_vec_t::const_iterator iter = result.begin(); iter != result.end(); ++iter)
|
| | | {
|
| | | ss << "[" << WRAPPER_TEXT(iter->db_id) << "," << WRAPPER_TEXT(iter->st_id) << "," << WRAPPER_TEXT(iter->confidence) << "]";
|
| | | ss << "[" << WRAPPER_TEXT(iter->db_id) << "," |
| | | << WRAPPER_TEXT(iter->st_id) << "," |
| | | << WRAPPER_TEXT(iter->confidence) << "," |
| | | << WRAPPER_TEXT(iter->camera_id) << "," |
| | | << WRAPPER_TEXT(iter->st_track_id) << "]";
|
| | | if (iter != std::prev(result.end()))
|
| | | ss << ",";
|
| | | }
|
| | |
| | | stimg.height = pbFaceListImage.height();
|
| | | stimg.size = img->size();
|
| | | stimg.buff = (const uint8_t*)img->data();
|
| | | result.push_back(g_STFaceCache.detect(stimg));
|
| | | |
| | | FDP_FaceDetectResult res(g_STFaceCache.detect(stimg));
|
| | | |
| | | #ifdef ENABLE_ADD_TO_TEMPDB_WHEN_NOT_DETECT
|
| | | if (res.db_id == STFS_DBID_INVALID)
|
| | | {
|
| | | // #todo optimize extract feature once
|
| | | stimg.db_id = STFS_DBID_TEMPDB_1;
|
| | | res = g_STFaceCache.add(stimg);
|
| | | }
|
| | | #endif
|
| | |
|
| | | res.camera_id = fdpFaceDetectPB->camera_id;
|
| | | res.st_track_id = pbFaceListImage.st_track_id();
|
| | | result.push_back(res);
|
| | | }
|
| | |
|
| | | //#test
|