// // 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 #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 cam_id_name; // cam_id 和相机名字的映射关系 好像只有他可以用 std::map cam_name_id; // cam_id 和相机名字的映射关系 }; typedef struct _IntersectReg { int count; //区域坐标点的个数 SPoint* point; //点的信息(关联的区域) Polygon poly; std::string recver_chan; // 待接收通道 std::vector srcFPoint_vec; std::vector dstFPoint_vec; bool isInitHomography; // float homography[3][3]; cv::Mat homography; // 每个区域都有该区域点到全局图像的矩阵 }IntersectReg; typedef struct _CamRelation { int count; //多少个相机 std::map>> camReg_map; // cam_id 和区域相对 std::map regCount; // cam_id 和区域的个数相对(上边*数组的个数) std::map isUpdate; // cam_id 和区域中是否已经根据图片信息更新 std::map isHomog; // cam_id 和区域中是否已经根据图片信息更新 bool isCatInter; }CamRelation; #endif //INC_01_CPP_SORT_CONFIG_UTIL_H