From 8e411d84c68bae1886db6b5c7d4bdc7b0cc79af3 Mon Sep 17 00:00:00 2001 From: liusiyang Date: Mon, 12 Oct 2026 11:31:33 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=AE=8C=E5=96=84=E7=BC=BA=E9=99=B7?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AlgorithmModule/include/ImgCheckConfig.h | 5 +++-- AlgorithmModule/src/ImageResultJudge.cpp | 6 +++--- AlgorithmModule/src/ImgCheckAnalysisy.cpp | 18 ++++++++++++++---- ConfigModule/include/CheckConfigDefine.h | 2 -- ConfigModule/src/ConfigManager.cpp | 20 +++++++++++--------- ConfigModule/src/JsonConfig.cpp | 10 +++++----- 6 files changed, 36 insertions(+), 25 deletions(-) diff --git a/AlgorithmModule/include/ImgCheckConfig.h b/AlgorithmModule/include/ImgCheckConfig.h index 1b6d4cb..f71eb12 100644 --- a/AlgorithmModule/include/ImgCheckConfig.h +++ b/AlgorithmModule/include/ImgCheckConfig.h @@ -54,8 +54,9 @@ enum ERROR_TYPE_ ERROR_TYPE_LianXi, // 4 连锡 ERROR_TYPE_QueXi, // 5 缺锡 ERROR_TYPE_YiWu, // 6 异物 - ERROR_TYPE_C_BianXing, // 7 C型卡口异常 - ERROR_TYPE_other, // 8 其他 + ERROR_TYPE_PianYi, // 7 PIN偏移 + ERROR_TYPE_C_BianXing, // 8 C型卡口异常 + ERROR_TYPE_Panel, // 9 Panel ERROR_TYPE_COUNT, }; extern std::vector QX_Result_Names; diff --git a/AlgorithmModule/src/ImageResultJudge.cpp b/AlgorithmModule/src/ImageResultJudge.cpp index 90e43a8..8faa4ee 100644 --- a/AlgorithmModule/src/ImageResultJudge.cpp +++ b/AlgorithmModule/src/ImageResultJudge.cpp @@ -1081,10 +1081,10 @@ int ImageResultJudge::ConfigTypeToResultType(int nconfigType) case CONFIG_QX_NAME_C_BianXing: resultError_type = ERROR_TYPE_C_BianXing; break; - case CONFIG_QX_NAME_other: - resultError_type = ERROR_TYPE_other; + case CONFIG_QX_NAME_PIN_PianYi: + resultError_type = ERROR_TYPE_PianYi; break; - + default: break; } diff --git a/AlgorithmModule/src/ImgCheckAnalysisy.cpp b/AlgorithmModule/src/ImgCheckAnalysisy.cpp index 53fd921..78475cc 100644 --- a/AlgorithmModule/src/ImgCheckAnalysisy.cpp +++ b/AlgorithmModule/src/ImgCheckAnalysisy.cpp @@ -527,8 +527,9 @@ int ImgCheckAnalysisy::CheckRun() alignErr.flen = tplRect.width * m_fImgage_Scale_X; alignErr.fbreadth = tplRect.height * m_fImgage_Scale_Y; - alignErr.nconfig_qx_type = CONFIG_QX_NAME_other; - alignErr.qx_name = CONFIG_QX_NAME_Names[CONFIG_QX_NAME_other]; + // 缺陷列表中原 other(其他)已移除;内外边缘对齐超差暂按 C型卡口异常 上报(待确认) + alignErr.nconfig_qx_type = CONFIG_QX_NAME_C_BianXing; + alignErr.qx_name = CONFIG_QX_NAME_Names[CONFIG_QX_NAME_C_BianXing]; alignErr.grayDis = diff_align; // 记录内外边缘夹角(度) alignErr.detRegionidxList.push_back(0); @@ -1884,7 +1885,8 @@ int ImgCheckAnalysisy::DrawResult_Step_1() int ImgCheckAnalysisy::AIClassTypeToConfigType(int nAIQXType) { - int resultError_type = CONFIG_QX_NAME_other; + // 无对应缺陷类型时返回 CONFIG_QX_NAME_count(缺陷列表已移除 other) + int resultError_type = CONFIG_QX_NAME_count; switch (nAIQXType) { case AI_CLass_QX_NAME_PIN_PoSun: @@ -1909,7 +1911,8 @@ int ImgCheckAnalysisy::AIClassTypeToConfigType(int nAIQXType) resultError_type = CONFIG_QX_NAME_C_BianXing; break; case AI_CLass_QX_NAME_other: - resultError_type = CONFIG_QX_NAME_other; + // 缺陷列表已移除 other,AI 分类的“其他”类无对应配置缺陷类型 + resultError_type = CONFIG_QX_NAME_count; break; default: break; @@ -2190,6 +2193,13 @@ int ImgCheckAnalysisy::BLobToDetResult() roi.height = blobs.blobTab[i].maxy - blobs.blobTab[i].miny + 1; int config_qx_type = blobs.blobTab[i].AIclasstype; + if (config_qx_type < 0 || config_qx_type >= CONFIG_QX_NAME_count) + { + // AI 分类为“其他”等无对应缺陷类型的情况,不参与缺陷结果分析 + m_pdetlog->AddCheckstr(PrintLevel_1, DET_LOG_LEVEL_3, "BLobToDetResult", + "blob idx %d invalid AIclasstype %d skip", i, config_qx_type); + continue; + } float JudgArea = blobs.blobTab[i].JudgArea; float fsecondArea = JudgArea; diff --git a/ConfigModule/include/CheckConfigDefine.h b/ConfigModule/include/CheckConfigDefine.h index 0cc5dfd..b64d899 100644 --- a/ConfigModule/include/CheckConfigDefine.h +++ b/ConfigModule/include/CheckConfigDefine.h @@ -46,7 +46,6 @@ enum CONFIG_QX_NAME_ CONFIG_QX_NAME_QueXi, // 分类 缺锡 CONFIG_QX_NAME_YiWu, // 分类 异物 CONFIG_QX_NAME_C_BianXing, // 分类 C型卡口异常 - CONFIG_QX_NAME_other, // 分类 其他 CONFIG_QX_NAME_PIN_PianYi, // 分类 PIN偏移 CONFIG_QX_NAME_count, }; @@ -60,7 +59,6 @@ static std::vector CONFIG_QX_NAME_Names = "QueXi", "YiWu", "C_BianXing", - "other", "PIN_PianYi", }; diff --git a/ConfigModule/src/ConfigManager.cpp b/ConfigModule/src/ConfigManager.cpp index 8ea2c4e..ffc910d 100644 --- a/ConfigModule/src/ConfigManager.cpp +++ b/ConfigModule/src/ConfigManager.cpp @@ -31,20 +31,22 @@ std::vector QX_Result_Names = "LianXi", "QueXi", "YiWu", + "PianYi", "C_BianXing", - "other", + "Panel", }; std::vector QX_Result_Code = { "P0000", - "MA507", - "MA508", - "MA506", - "MA504", - "MA503", - "MA502", - "MA505", - "MA501", + "M200224", + "M200223", + "M200225", + "M200227", + "M200228", + "M200221", + "M200229", + "M200226", + "M101010", }; int ReadFlawCodeConfig(std::string json_path) diff --git a/ConfigModule/src/JsonConfig.cpp b/ConfigModule/src/JsonConfig.cpp index fcab0af..8bca1d8 100644 --- a/ConfigModule/src/JsonConfig.cpp +++ b/ConfigModule/src/JsonConfig.cpp @@ -936,15 +936,15 @@ int BaseFuntonConfigJson::GetFunction(Json::Value value) } _config.bigNG.qx[CONFIG_QX_NAME_C_BianXing].strname = "C_BianXing"; - if (value_f["form"]["other"]["open"]) + if (value_f["form"]["PIN_PianYi"]["open"]) { - _config.bigNG.qx[CONFIG_QX_NAME_other].bOpen = value_f["form"]["other"]["open"].asBool(); + _config.bigNG.qx[CONFIG_QX_NAME_PIN_PianYi].bOpen = value_f["form"]["PIN_PianYi"]["open"].asBool(); } - if (value_f["form"]["other"]["Area"]) + if (value_f["form"]["PIN_PianYi"]["Area"]) { - _config.bigNG.qx[CONFIG_QX_NAME_other].fArea = value_f["form"]["other"]["Area"].asFloat(); + _config.bigNG.qx[CONFIG_QX_NAME_PIN_PianYi].fArea = value_f["form"]["PIN_PianYi"]["Area"].asFloat(); } - _config.bigNG.qx[CONFIG_QX_NAME_other].strname = "other"; + _config.bigNG.qx[CONFIG_QX_NAME_PIN_PianYi].strname = "PIN_PianYi"; } else {