|
|
|
@ -170,7 +170,7 @@ int ImgCheckAnalysisy::GetStatus()
|
|
|
|
|
|
|
|
|
|
|
|
std::string ImgCheckAnalysisy::GetVersion()
|
|
|
|
std::string ImgCheckAnalysisy::GetVersion()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return std::string("BOE_1.2.6_" + std::string(__DATE__) + "_" + std::string(__TIME__));
|
|
|
|
return std::string("BOE_1.2.7_" + std::string(__DATE__) + "_" + std::string(__TIME__));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
std::string ImgCheckAnalysisy::GetErrorInfo()
|
|
|
|
std::string ImgCheckAnalysisy::GetErrorInfo()
|
|
|
|
@ -3360,6 +3360,7 @@ int ImgCheckAnalysisy::BLobToDetResult()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool bLD_Standard = false; // 是否通过LD标准判定(跳过UP/DP的IOU检查)
|
|
|
|
if (config_qx_type == CONFIG_QX_NAME_MTX ||
|
|
|
|
if (config_qx_type == CONFIG_QX_NAME_MTX ||
|
|
|
|
config_qx_type == CONFIG_QX_NAME_POL_Cell ||
|
|
|
|
config_qx_type == CONFIG_QX_NAME_POL_Cell ||
|
|
|
|
config_qx_type == CONFIG_QX_NAME_Other ||
|
|
|
|
config_qx_type == CONFIG_QX_NAME_Other ||
|
|
|
|
@ -3367,7 +3368,24 @@ int ImgCheckAnalysisy::BLobToDetResult()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
qx_name = CONFIG_QX_NAME_Names[config_qx_type];
|
|
|
|
qx_name = CONFIG_QX_NAME_Names[config_qx_type];
|
|
|
|
// m_TemCheck.AddCheckstr(PrintLevel_3, DET_LOG_LEVEL_3, "LD", "stsrt config_qx_type %s ", qx_name.c_str());
|
|
|
|
// m_TemCheck.AddCheckstr(PrintLevel_3, DET_LOG_LEVEL_3, "LD", "stsrt config_qx_type %s ", qx_name.c_str());
|
|
|
|
int dbresult = LDJudge(config_qx_type, roi, JudgArea, blobs.blobTab[i].maxValue, blobs.blobTab[i].grayDis, pQxlog);
|
|
|
|
int dbresult = -1;
|
|
|
|
|
|
|
|
if(m_pFuntion->function.f_LDConfig.bOpen && m_pFuntion->function.f_LDConfig.bUseLD_Standard)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if(blobs.blobTab[i].JudgArea >= m_pFuntion->function.f_LDConfig.fLD_Area &&
|
|
|
|
|
|
|
|
blobs.blobTab[i].grayDis >= m_pFuntion->function.f_LDConfig.fLD_HJ &&
|
|
|
|
|
|
|
|
blobs.blobTab[i].energy >= m_pFuntion->function.f_LDConfig.fLD_En &&
|
|
|
|
|
|
|
|
blobs.blobTab[i].len >= m_pFuntion->function.f_LDConfig.fLD_Len)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
dbresult = 1;
|
|
|
|
|
|
|
|
bLD_Standard = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
pQxlog->AddCheckstr(PrintLevel_3, DET_LOG_LEVEL_3, "LD Analysis", "Area %0.2f > %0.2f , hj %0.2f > %0.2f , Energy %0.2f > %0.2f , len %0.2f > %0.2f",
|
|
|
|
|
|
|
|
blobs.blobTab[i].JudgArea, m_pFuntion->function.f_LDConfig.fLD_Area, blobs.blobTab[i].grayDis, m_pFuntion->function.f_LDConfig.fLD_HJ, blobs.blobTab[i].energy, m_pFuntion->function.f_LDConfig.fLD_En, blobs.blobTab[i].len, m_pFuntion->function.f_LDConfig.fLD_Len);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(dbresult != 1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
dbresult = LDJudge(config_qx_type, roi, JudgArea, blobs.blobTab[i].maxValue, blobs.blobTab[i].grayDis, pQxlog);
|
|
|
|
|
|
|
|
}
|
|
|
|
//int detre = 1;
|
|
|
|
//int detre = 1;
|
|
|
|
// 表示L0 和 DP 都有的 亮的
|
|
|
|
// 表示L0 和 DP 都有的 亮的
|
|
|
|
if (dbresult == 1)
|
|
|
|
if (dbresult == 1)
|
|
|
|
@ -3375,8 +3393,7 @@ int ImgCheckAnalysisy::BLobToDetResult()
|
|
|
|
config_qx_type = CONFIG_QX_NAME_LD;
|
|
|
|
config_qx_type = CONFIG_QX_NAME_LD;
|
|
|
|
qx_name = CONFIG_QX_NAME_Names[config_qx_type];
|
|
|
|
qx_name = CONFIG_QX_NAME_Names[config_qx_type];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pQxlog->AddCheckstr(PrintLevel_2, DET_LOG_LEVEL_3, " LD Judge ", "%s qx %s ", Re_TO_STR_Pass_1(dbresult), qx_name.c_str());
|
|
|
|
pQxlog->AddCheckstr(PrintLevel_2, DET_LOG_LEVEL_3, " LD Judge ", "%s qx %s ", Re_TO_STR_Pass_1(dbresult), qx_name.c_str()); }
|
|
|
|
}
|
|
|
|
|
|
|
|
// 如果是chess 画面,缺陷类型直接是chess异常。
|
|
|
|
// 如果是chess 画面,缺陷类型直接是chess异常。
|
|
|
|
if (m_pFuntion->function.f_AIQX.bAllToChess)
|
|
|
|
if (m_pFuntion->function.f_AIQX.bAllToChess)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -3437,8 +3454,8 @@ int ImgCheckAnalysisy::BLobToDetResult()
|
|
|
|
|
|
|
|
|
|
|
|
QX_Stauts qx_status = QX_Stauts_Analysis;
|
|
|
|
QX_Stauts qx_status = QX_Stauts_Analysis;
|
|
|
|
|
|
|
|
|
|
|
|
// 和UP画面进行IOU判断
|
|
|
|
// 和UP画面进行IOU判断 (通过亮点标准的缺陷跳过此检查)
|
|
|
|
if (m_pFuntion->function.f_UseUpQX.bOpen)
|
|
|
|
if (!bLD_Standard && m_pFuntion->function.f_UseUpQX.bOpen)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (fupS >= m_pFuntion->function.f_UseUpQX.fIOU)
|
|
|
|
if (fupS >= m_pFuntion->function.f_UseUpQX.fIOU)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -3450,6 +3467,10 @@ int ImgCheckAnalysisy::BLobToDetResult()
|
|
|
|
pQxlog->AddCheckstr(PrintLevel_2, DET_LOG_LEVEL_3, "Up Mask judge", "UseUpQX.bOpen = true ;fupS = %0.2f < %02f ", fupS, m_pFuntion->function.f_UseUpQX.fIOU);
|
|
|
|
pQxlog->AddCheckstr(PrintLevel_2, DET_LOG_LEVEL_3, "Up Mask judge", "UseUpQX.bOpen = true ;fupS = %0.2f < %02f ", fupS, m_pFuntion->function.f_UseUpQX.fIOU);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (bLD_Standard)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
pQxlog->AddCheckstr(PrintLevel_2, DET_LOG_LEVEL_3, "Up Mask judge", "bLD_Standard = true, skip UP/DP IOU check ;fupS = %0.2f ", fupS);
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
pQxlog->AddCheckstr(PrintLevel_2, DET_LOG_LEVEL_3, "Up Mask judge", "UseUpQX.bOpen = false ;fupS = %0.2f ", fupS);
|
|
|
|
pQxlog->AddCheckstr(PrintLevel_2, DET_LOG_LEVEL_3, "Up Mask judge", "UseUpQX.bOpen = false ;fupS = %0.2f ", fupS);
|
|
|
|
@ -3505,6 +3526,7 @@ int ImgCheckAnalysisy::BLobToDetResult()
|
|
|
|
temerror.grayDis = blobs.blobTab[i].grayDis;
|
|
|
|
temerror.grayDis = blobs.blobTab[i].grayDis;
|
|
|
|
temerror.density = blobs.blobTab[i].density;
|
|
|
|
temerror.density = blobs.blobTab[i].density;
|
|
|
|
temerror.fUpIou = fupS;
|
|
|
|
temerror.fUpIou = fupS;
|
|
|
|
|
|
|
|
temerror.bIsStandardLD = bLD_Standard;
|
|
|
|
temerror.whiteOrBlack = blobs.blobTab[i].whiteOrblack;
|
|
|
|
temerror.whiteOrBlack = blobs.blobTab[i].whiteOrblack;
|
|
|
|
temerror.qx_status = qx_status;
|
|
|
|
temerror.qx_status = qx_status;
|
|
|
|
|
|
|
|
|
|
|
|
|