diff --git a/AlgorithmModule/src/ImageResultJudge.cpp b/AlgorithmModule/src/ImageResultJudge.cpp index efc022d..81c73d4 100644 --- a/AlgorithmModule/src/ImageResultJudge.cpp +++ b/AlgorithmModule/src/ImageResultJudge.cpp @@ -251,15 +251,14 @@ int ImageResultJudge::ResultJudge(std::shared_ptr pImageResult) // 遍历当前区域所属的 区域进行参数判断。 for (auto iregion : QX_info->detRegionidxList) { - // 只处理检测区域(type == 0) - int regionType = m_pCommonAnalysisyConfig->regionConfigArr.at(iregion).basicInfo.type; - if (regionType != 0) + // 只处理基础的检测参数。 + if (iregion != 0) { continue; } - pQxLog->AddCheckstr(PrintLevel_2, "QX info", ">>>>>>>> region %d type %d", - iregion + 1, regionType); + pQxLog->AddCheckstr(PrintLevel_2, "QX info", ">>>>>>>> region %d ", + iregion + 1); // 1、判断当前区域是否要检测该通道画面。 @@ -1584,15 +1583,14 @@ int ImageResultJudge::AnalysisResult_Pre(QX_ERROR_INFO_ *QX_info) // 遍历当前区域所属的 区域进行参数判断。 for (auto iregion : QX_info->detRegionidxList) { - // 只对弱化区域(type == 2)进行弱化处理 - int regionType = m_pCommonAnalysisyConfig->regionConfigArr.at(iregion).basicInfo.type; - if (regionType != 2) + // 只找到非0区域进行弱化处理 + if (iregion == 0) { continue; } bpre_use = true; - pQxLog->AddCheckstr(PrintLevel_2, "QX info", ">>>>>>>> region %d type %d", - iregion + 1, regionType); + pQxLog->AddCheckstr(PrintLevel_2, "QX info", ">>>>>>>> region %d ", + iregion + 1); // 1、判断当前区域是否要检测该通道画面。 diff --git a/AlgorithmModule/src/ImgCheckAnalysisy.cpp b/AlgorithmModule/src/ImgCheckAnalysisy.cpp index 0bc9f13..94c4833 100644 --- a/AlgorithmModule/src/ImgCheckAnalysisy.cpp +++ b/AlgorithmModule/src/ImgCheckAnalysisy.cpp @@ -3532,19 +3532,13 @@ int ImgCheckAnalysisy::BLobToDetResult() temerror.whiteOrBlack = blobs.blobTab[i].whiteOrblack; temerror.qx_status = qx_status; - // 添加区域检测(type0=检测区域, type2=弱化区域) + // 添加弱化检测 { cv::Point pCenter; pCenter.x = roi.x + roi.width * 0.5; pCenter.y = roi.y + roi.height * 0.5; - for (int iregion = 0; iregion < m_DetRoiList.roiList_Src.size(); iregion++) + for (int iregion = 1; iregion < m_DetRoiList.roiList_Src.size(); iregion++) { - int regionType = m_pCommonAnalysisyConfig->regionConfigArr.at(iregion).basicInfo.type; - // type==0 检测区域, type==2 弱化区域 - if (regionType != 0 && regionType != 2) - { - continue; - } bool bInChannel = false; // 当前区域是否有包含的通道。 @@ -3561,10 +3555,10 @@ int ImgCheckAnalysisy::BLobToDetResult() } } - pQxlog->AddCheckstr(PrintLevel_3, DET_LOG_LEVEL_3, "pre Judge", "iregion %d type %d channel %s ,channellist %s", - iregion, regionType, BOOL_TO_STR(bInChannel), strchannelshow.c_str()); + pQxlog->AddCheckstr(PrintLevel_3, DET_LOG_LEVEL_3, "pre Judge", "iregion %d channel %s ,channellist %s", + iregion, BOOL_TO_STR(bInChannel), strchannelshow.c_str()); } - // 通道匹配则加入区域列表 + // 需要弱化处理 if (bInChannel) { const std::vector &polygon = m_DetRoiList.roiList_Src[iregion]; @@ -3576,6 +3570,8 @@ int ImgCheckAnalysisy::BLobToDetResult() temerror.detRegionidxList.push_back(iregion); } } + // 添加基础检测 + temerror.detRegionidxList.push_back(0); } m_pDetResult->pQx_ErrorList->push_back(temerror);