|
|
|
@ -3507,13 +3507,19 @@ int ImgCheckAnalysisy::BLobToDetResult()
|
|
|
|
temerror.whiteOrBlack = blobs.blobTab[i].whiteOrblack;
|
|
|
|
temerror.whiteOrBlack = blobs.blobTab[i].whiteOrblack;
|
|
|
|
temerror.qx_status = qx_status;
|
|
|
|
temerror.qx_status = qx_status;
|
|
|
|
|
|
|
|
|
|
|
|
// 添加弱化检测
|
|
|
|
// 添加区域检测(type0=检测区域, type2=弱化区域)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cv::Point pCenter;
|
|
|
|
cv::Point pCenter;
|
|
|
|
pCenter.x = roi.x + roi.width * 0.5;
|
|
|
|
pCenter.x = roi.x + roi.width * 0.5;
|
|
|
|
pCenter.y = roi.y + roi.height * 0.5;
|
|
|
|
pCenter.y = roi.y + roi.height * 0.5;
|
|
|
|
for (int iregion = 1; iregion < m_DetRoiList.roiList_Src.size(); iregion++)
|
|
|
|
for (int iregion = 0; 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;
|
|
|
|
bool bInChannel = false;
|
|
|
|
// 当前区域是否有包含的通道。
|
|
|
|
// 当前区域是否有包含的通道。
|
|
|
|
@ -3530,10 +3536,10 @@ int ImgCheckAnalysisy::BLobToDetResult()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pQxlog->AddCheckstr(PrintLevel_3, DET_LOG_LEVEL_3, "pre Judge", "iregion %d channel %s ,channellist %s",
|
|
|
|
pQxlog->AddCheckstr(PrintLevel_3, DET_LOG_LEVEL_3, "pre Judge", "iregion %d type %d channel %s ,channellist %s",
|
|
|
|
iregion, BOOL_TO_STR(bInChannel), strchannelshow.c_str());
|
|
|
|
iregion, regionType, BOOL_TO_STR(bInChannel), strchannelshow.c_str());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 需要弱化处理
|
|
|
|
// 通道匹配则加入区域列表
|
|
|
|
if (bInChannel)
|
|
|
|
if (bInChannel)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const std::vector<cv::Point> &polygon = m_DetRoiList.roiList_Src[iregion];
|
|
|
|
const std::vector<cv::Point> &polygon = m_DetRoiList.roiList_Src[iregion];
|
|
|
|
@ -3545,8 +3551,6 @@ int ImgCheckAnalysisy::BLobToDetResult()
|
|
|
|
temerror.detRegionidxList.push_back(iregion);
|
|
|
|
temerror.detRegionidxList.push_back(iregion);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 添加基础检测
|
|
|
|
|
|
|
|
temerror.detRegionidxList.push_back(0);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
m_pDetResult->pQx_ErrorList->push_back(temerror);
|
|
|
|
m_pDetResult->pQx_ErrorList->push_back(temerror);
|
|
|
|
|