From 1ef5102b93ef4339ca269b98e1078d0b007b99da Mon Sep 17 00:00:00 2001 From: liusiyang Date: Tue, 1 Sep 2026 09:55:12 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E6=B7=BB=E5=8A=A0=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/SystemCommonDefine.h | 2 ++ example/deal.cpp | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/example/SystemCommonDefine.h b/example/SystemCommonDefine.h index 9716d2b..9f08963 100644 --- a/example/SystemCommonDefine.h +++ b/example/SystemCommonDefine.h @@ -46,6 +46,7 @@ struct SystemConfigParam std::string config_Root_Path; + std::string save_Img_Root_Path; // 检测结果图保存根目录 int Use_CPU_StartIdx; // 使用 CPU 的开始核 int nWorkIdx; // 工位号 @@ -54,6 +55,7 @@ struct SystemConfigParam { Use_CPU_StartIdx = 0; config_Root_Path = ""; + save_Img_Root_Path = "/home/aidlux/BOE/FOG/Detsave/"; nWorkIdx = 0; for(int i=0; i<4; i++) GPU_Device_ID_List[i] = -1; } diff --git a/example/deal.cpp b/example/deal.cpp index 692428e..52c843b 100644 --- a/example/deal.cpp +++ b/example/deal.cpp @@ -841,7 +841,7 @@ void deal::ResultThread(int id) if (true) { // 存图 - std::string savepath = "/home/aidlux/BOE/FOG/Detsave/"; + std::string savepath = m_system_param.save_Img_Root_Path; saveImg(savepath, dealResult); // saveImg("/home/aidlux/BOE/ResultImg/", dealResult); } @@ -850,7 +850,7 @@ void deal::ResultThread(int id) // 存 检测统计 日志 mutex_DetResult_.lock(); m_DetResult.print(false); - std::string strlog = "/home/aidlux/BOE/FOG/Detsave/"; + std::string strlog = m_system_param.save_Img_Root_Path; if (m_strCurDate != "") { strlog += m_strCurDate; @@ -942,6 +942,10 @@ bool deal::ReadSystemConfig(const std::string &strPath) m_system_param.Use_CPU_StartIdx = root["Use_CPU_StartIdx"].asInt(); m_system_param.nWorkIdx = root["Detect_Work_Idx"].asInt(); m_system_param.config_Root_Path = root["Config_Root_Path"].asString(); + if (root.isMember("Save_Img_Root_Path")) + { + m_system_param.save_Img_Root_Path = root["Save_Img_Root_Path"].asString(); + } for (int i = 0; i < 4; i++) m_system_param.GPU_Device_ID_List[i] = -1;