From 62db15127287262a0a78e63164d4d10a4999a1da Mon Sep 17 00:00:00 2001 From: liusiyang Date: Fri, 16 Oct 2026 09:12:07 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=B0=83=E6=95=B4=E5=85=B3=E8=81=94?= =?UTF-8?q?=E9=80=9A=E9=81=93=E5=85=A5=E5=88=97=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AlgorithmModule/src/ImageResultJudge.cpp | 36 +++++++++++++----------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/AlgorithmModule/src/ImageResultJudge.cpp b/AlgorithmModule/src/ImageResultJudge.cpp index 18a0ced..33e515a 100644 --- a/AlgorithmModule/src/ImageResultJudge.cpp +++ b/AlgorithmModule/src/ImageResultJudge.cpp @@ -223,6 +223,25 @@ int ImageResultJudge::ResultJudge(std::shared_ptr pImageResult) QX_info->result = QX_RESULT_TYPE_NoJduge; + // 关联通道分析:登记关联过滤源缺陷位置(类型由 analysis_bind.correlated_types 配置, 如脏污/暗点), + // 供 AD 分析判断关联通道是否存在重叠缺陷。 + // 登记只依赖缺陷类型与位置,与判定结果/是否绘制无关: + // 被分到 NoJudge(不判定/Draw)的缺陷也要登记(如 DP 上未开启 AD 判定的暗点),否则无法过滤其它通道的重叠缺陷 + if (m_pQX_Merge_Analysis->IsCorrelatedSourceConfigType(config_qx_type)) + { + QX_Merge_Analysis::Correlated_Qx_Info_ corr_qx; + corr_qx.channel_name = pImageResult->strChannel; + corr_qx.camera_name = pImageResult->cameraBaseResult->strCameraName; + corr_qx.config_qx_type = config_qx_type; + corr_qx.result_type = ConfigTypeToResultType(config_qx_type); + corr_qx.product_roi = roi; + corr_qx.product_roi.x += fproduct_offx_piexl; + + bool bAddCorr = m_pQX_Merge_Analysis->AddCorrelatedQxInfo(corr_qx, pQxLog); + pQxLog->AddCheckstr(PrintLevel_2, DET_LOG_LEVEL_3, " Use Num And Dis Judge ", "qx %s ,Add Correlated %s %s", + qx_name.c_str(), BOOL_TO_STR_Error(bAddCorr), corr_qx.GetInfo().c_str()); + } + // 在其他位置已经判断了 不进入分析。直接绘制。 if (qx_status == QX_Stauts_Draw) { @@ -746,23 +765,6 @@ int ImageResultJudge::ResultJudge(std::shared_ptr pImageResult) pQxLog->AddCheckstr(PrintLevel_2, DET_LOG_LEVEL_3, " Use Num And Dis Judge ", "qx %s ,Add %s %s", qx_name.c_str(), BOOL_TO_STR_Error(bad), CheckUtil::getCurTimeHMS().c_str()); } } - - // 关联通道分析:登记关联过滤源缺陷位置(类型由 analysis_bind.correlated_types 配置, 如脏污/暗点), - // 供 AD 分析判断关联通道是否存在重叠缺陷 - if (m_pQX_Merge_Analysis->IsCorrelatedSourceConfigType(config_qx_type)) - { - QX_Merge_Analysis::Correlated_Qx_Info_ corr_qx; - corr_qx.channel_name = pImageResult->strChannel; - corr_qx.camera_name = pImageResult->cameraBaseResult->strCameraName; - corr_qx.config_qx_type = config_qx_type; - corr_qx.result_type = ConfigTypeToResultType(config_qx_type); - corr_qx.product_roi = roi; - corr_qx.product_roi.x += fproduct_offx_piexl; - - bool bAddCorr = m_pQX_Merge_Analysis->AddCorrelatedQxInfo(corr_qx, pQxLog); - pQxLog->AddCheckstr(PrintLevel_2, DET_LOG_LEVEL_3, " Use Num And Dis Judge ", "qx %s ,Add Correlated %s %s", - qx_name.c_str(), BOOL_TO_STR_Error(bAddCorr), corr_qx.GetInfo().c_str()); - } } pQxLog->AddCheckstr(PrintLevel_2, DET_LOG_LEVEL_3, " Cur Result ", "qx %s ,result = %s", qx_name.c_str(), resultType.c_str());