You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.2 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*
//定义整个系统基础的 定义 信息
*/
#ifndef Define_Base_H_
#define Define_Base_H_
#include <string>
#include <opencv2/opencv.hpp>
#include "CheckUtil.hpp"
#include "ImgCheckConfig.h"
#include "ImageDetConfig.h"
#include "Define_Error.h"
// 检测分析线程类数目
#define IMGCHECKANALYSISY_NUM 2
// 检测线程绑定的 CPU 核带(核带下沉到库内部,调用方传入的 nCpu_start_Idx / nCpu_num 不再生效)
// 分配规则:第 k 个检测线程绑定 核 = CHECK_CPU_BAND_START + (k % CHECK_CPU_BAND_NUM)
// 当前 4 个检测线程落在 15,16,17,18逻辑核 c 与 c+16 为超线程兄弟,故物理核为 15,0,1,2
// 注意CHECK_CPU_BAND_NUM 必须 >= 相机数 * IMGCHECKANALYSISY_NUM否则取模回绕会导致两个检测线程绑同一核
#define CHECK_CPU_BAND_START 15
#define CHECK_CPU_BAND_NUM 8
// 相机ID 的相关定义
enum Camera_IDX
{
Camera_IDX_0 = 0,
Camera_IDX_1 = 1,
};
static const std::string strCameraName[] =
{
"left",
"right"};
struct Camera_Info
{
Camera_IDX camera_ID;
std::string camera_name;
Camera_Info()
{
Init();
}
void Init()
{
camera_ID = Camera_IDX_0;
camera_name = strCameraName[camera_ID];
}
};
#endif