Commit 3e7095cbf82d33429497a00f0c56ab28d7008f12

Authored by Hu Chunming
1 parent 8dcef6cb

添加时间戳字段

src/ai_platform/header.h
... ... @@ -72,6 +72,7 @@ typedef struct ObjectData {
72 72 int bottom; //该物体位置的下坐标
73 73 int index; //该物体所属类别的编号
74 74 double confidence; //该物体的置信度
  75 + std::string str_ts_ms; //时间
75 76  
76 77 string ori_pic_path;
77 78 string obj_pic_path;
... ...
src/ai_platform/mvpt.cpp
... ... @@ -576,6 +576,7 @@ void CMultiSourceProcess::vehicle_locus_finished(const OBJ_KEY obj_key) {
576 576 res_obj.ori_img_info = obj_value.snapShot;
577 577 res_obj.obj_pic_path = object_file_name;
578 578 res_obj.obj_img_info = obj_value.snapShotLittle;
  579 + res_obj.str_ts_ms = cur_timestamp_ms;
579 580 m_feature_analysis.update_object_info(res_obj, obj_value.snapShotLittle);
580 581  
581 582 bool bSaved = save_obj_pic(res_obj);
... ...
src/demo/demo.cpp
... ... @@ -217,7 +217,7 @@ void show_result(ObjectData obj)
217 217 }
218 218 printf("\n");
219 219  
220   - string result_path = "./res/result/" + obj.task_id + "_" + to_string(obj.object_id) + ".jpg";
  220 + string result_path = "./res/result/" + obj.task_id + "_" + to_string(obj.object_id) + "_" + obj.str_ts_ms + ".jpg";
221 221 cv::imwrite(result_path, image);
222 222 image.release();
223 223 }
... ...