update 完善缺陷列表映射

dev_lsy
liusiyang 3 weeks ago
parent 9a14079b61
commit 8e411d84c6

@ -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<std::string> QX_Result_Names;

@ -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;
}

@ -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;

@ -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<std::string> CONFIG_QX_NAME_Names =
"QueXi",
"YiWu",
"C_BianXing",
"other",
"PIN_PianYi",
};

@ -31,20 +31,22 @@ std::vector<std::string> QX_Result_Names =
"LianXi",
"QueXi",
"YiWu",
"PianYi",
"C_BianXing",
"other",
"Panel",
};
std::vector<std::string> 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)

@ -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
{

Loading…
Cancel
Save