Blame view

src/reprocessing_module/snapshot_reprocessing.h 1.43 KB
0b4cd5d5   Hu Chunming   完成轨迹定时抓拍
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
  /*
   * @Author: yangzilong
   * @Date: 2021-12-17 20:27:57
   * @Last Modified by: yangzilong
   * @Email: yangzilong@objecteye.com
   * @Description:
   */
  #pragma once
  
  #include "../ai_platform/det_obj_header.h"
  #include <vector>
  #include <set>
  #include <string>
  #include <map>
  #include <bitset>
  #include "../ai_platform/task_param_manager.h"
  #include "../ai_platform/header.h"
  
  // #define EXPANSION_PROPORTION 0.1
  #define EXPANSION_PROPORTION 0.25 
  #define FACE_EXPANSION_PROPORTION 0.5
  #define IMG_CHANNELS 3
  
  // using namespace std;
  using std::vector;
  using std::map;
  using std::set;
  
  class DeviceMemory;
  
  typedef struct multi_obj_data_t{
  	long long id;
  	DeviceMemory *memPtr;
  	std::vector<video_object_info> objs;
  	string task_id;
  } multi_obj_data_t;
  
  class snapshot_reprocessing
  {
  public:
  	//更新最优快照
  	static snapshot_reprocessing* getInstance()
  	{
  		static snapshot_reprocessing snapshot_reprocessing_instance;
  		return &snapshot_reprocessing_instance;
  	}
  
  	vector<multi_obj_data_t> get_vehicle_snapshot(vector<DeviceMemory*> vec_devMem, vector<onelevel_det_result>& ol_det_result, int skip_frame);
  
  private:
  	snapshot_reprocessing();
  
  	map<string, set<int>> algor_index_table;
  	task_param_manager *m_task_param_manager;
  
  public:
  
  	void screen_effective_snapshot(const vector<string> &taskid_inplay, vector<onelevel_det_result> &_onelevel_det_result);
  	void filter_vehicle(vector<DeviceMemory*> vec_devMem, vector<onelevel_det_result> &_onelevel_det_result);
  
  };