派生自 Algorithm/baseDetector

Scheaven
2021-06-03 168af40fe9a3cc81c6ee16b3e81f154780c36bdb
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
62
63
//
// Created by Scheaven on 2020/4/27.
//
 
#ifndef INC_01_CPP_SORT_CONFIG_UTIL_H
#define INC_01_CPP_SORT_CONFIG_UTIL_H
#include "../config.h"
#include <string>
#include "../utils/geometry_util.h"
 
typedef struct m_staticStruct
{
    static std::string cfg_path;
    static std::string weights_path;
    static std::string tracker_model;
    static std::string reid_model;
    static std::string coco_path;
    static std::string reid_img;
    static int max_cam_num;
    static int wander_time;
    static float mv_velocity;
    static float fall_rate;
    static uint64_t human_ids;
}M_STATICSTRUCT, *P_STATICSTRUCT;
 
class COMMON_VAR
{
public:
    static COMMON_VAR* get()
    {
        static COMMON_VAR v;
        return &v;
    }
    std::map<int,std::string> cam_id_name; // cam_id 和相机名字的映射关系 好像只有他可以用
    std::map<std::string,int> cam_name_id; // cam_id 和相机名字的映射关系
};
 
typedef struct _IntersectReg
{
    int count; //区域坐标点的个数
    SPoint* point; //点的信息(关联的区域)
    Polygon poly;
    std::string recver_chan; // 待接收通道
 
    std::vector<cv::Point2f> srcFPoint_vec;
    std::vector<cv::Point2f> dstFPoint_vec;
    bool isInitHomography;
//    float homography[3][3];
    cv::Mat homography;  // 每个区域都有该区域点到全局图像的矩阵
 
}IntersectReg;
 
typedef struct _CamRelation
{
    int count; //多少个相机
    std::map<std::string, std::vector<std::shared_ptr<IntersectReg>>> camReg_map; // cam_id 和区域相对
    std::map<std::string, int> regCount; // cam_id 和区域的个数相对(上边*数组的个数)
    std::map<std::string, bool> isUpdate; // cam_id 和区域中是否已经根据图片信息更新
    std::map<std::string, bool> isHomog; // cam_id 和区域中是否已经根据图片信息更新
    bool isCatInter;
}CamRelation;
 
#endif //INC_01_CPP_SORT_CONFIG_UTIL_H