update 优化缺陷列表1

dev_lsy
liusiyang 3 weeks ago
parent 41de73ee57
commit e23c3df9d5

@ -14,26 +14,24 @@ enum AI_CLass_QX_NAME_
{ {
AI_CLass_QX_NAME_PIN_PoSun, // PIN破损 AI_CLass_QX_NAME_PIN_PoSun, // PIN破损
AI_CLass_QX_NAME_PIN_QueShi, // PIN缺失
AI_CLass_QX_NAME_BTB_DuanLie, // BTB断裂 AI_CLass_QX_NAME_BTB_DuanLie, // BTB断裂
AI_CLass_QX_NAME_LianXi, // 连锡 AI_CLass_QX_NAME_LianXi, // 连锡
AI_CLass_QX_NAME_QueXi, // 缺锡 AI_CLass_QX_NAME_QueXi, // 缺锡
AI_CLass_QX_NAME_YiWu, // 异物 AI_CLass_QX_NAME_YiWu, // 异物
AI_CLass_QX_NAME_C_BianXing, // C型卡口异常 AI_CLass_QX_NAME_C_BianXing, // C型卡口异常
AI_CLass_QX_NAME_other, // 其他 AI_CLass_QX_NAME_Panel, // Panel
AI_CLass_QX_NAME_count, AI_CLass_QX_NAME_count,
}; };
// 缺陷项对应在参数中的名称 // 缺陷项对应在参数中的名称
static const std::string AI_CLass_QX_NAME_Names[] = static const std::string AI_CLass_QX_NAME_Names[] =
{ {
"PIN_PoSun", "PIN_PoSun",
"PIN_QueShi",
"BTB_DuanLie", "BTB_DuanLie",
"LianXi", "LianXi",
"QueXi", "QueXi",
"YiWu", "YiWu",
"C_BianXing", "C_BianXing",
"other", "Panel",
}; };
#endif #endif

@ -1084,6 +1084,9 @@ int ImageResultJudge::ConfigTypeToResultType(int nconfigType)
case CONFIG_QX_NAME_PIN_PianYi: case CONFIG_QX_NAME_PIN_PianYi:
resultError_type = ERROR_TYPE_PianYi; resultError_type = ERROR_TYPE_PianYi;
break; break;
case CONFIG_QX_NAME_Panel:
resultError_type = ERROR_TYPE_Panel;
break;
default: default:
break; break;

@ -1610,35 +1610,31 @@ int ImgCheckAnalysisy::AI_QX_Class_Thread()
break; break;
case 1: case 1:
cls_num = AI_CLass_QX_NAME_PIN_QueShi;
break;
case 2:
cls_num = AI_CLass_QX_NAME_BTB_DuanLie; cls_num = AI_CLass_QX_NAME_BTB_DuanLie;
break; break;
case 3: case 2:
cls_num = AI_CLass_QX_NAME_LianXi; cls_num = AI_CLass_QX_NAME_LianXi;
break; break;
case 4: case 3:
cls_num = AI_CLass_QX_NAME_QueXi; cls_num = AI_CLass_QX_NAME_QueXi;
break; break;
case 5: case 4:
cls_num = AI_CLass_QX_NAME_YiWu; cls_num = AI_CLass_QX_NAME_YiWu;
break; break;
case 6: case 5:
cls_num = AI_CLass_QX_NAME_C_BianXing; cls_num = AI_CLass_QX_NAME_C_BianXing;
break; break;
case 7: case 6:
cls_num = AI_CLass_QX_NAME_other; cls_num = AI_CLass_QX_NAME_Panel;
break; break;
default: default:
cls_num = AI_CLass_QX_NAME_other; cls_num = AI_CLass_QX_NAME_Panel;
break; break;
} }
@ -1892,9 +1888,6 @@ int ImgCheckAnalysisy::AIClassTypeToConfigType(int nAIQXType)
case AI_CLass_QX_NAME_PIN_PoSun: case AI_CLass_QX_NAME_PIN_PoSun:
resultError_type = CONFIG_QX_NAME_PIN_PoSun; resultError_type = CONFIG_QX_NAME_PIN_PoSun;
break; break;
case AI_CLass_QX_NAME_PIN_QueShi:
resultError_type = CONFIG_QX_NAME_PIN_QueShi;
break;
case AI_CLass_QX_NAME_BTB_DuanLie: case AI_CLass_QX_NAME_BTB_DuanLie:
resultError_type = CONFIG_QX_NAME_BTB_DuanLie; resultError_type = CONFIG_QX_NAME_BTB_DuanLie;
break; break;
@ -1910,9 +1903,8 @@ int ImgCheckAnalysisy::AIClassTypeToConfigType(int nAIQXType)
case AI_CLass_QX_NAME_C_BianXing: case AI_CLass_QX_NAME_C_BianXing:
resultError_type = CONFIG_QX_NAME_C_BianXing; resultError_type = CONFIG_QX_NAME_C_BianXing;
break; break;
case AI_CLass_QX_NAME_other: case AI_CLass_QX_NAME_Panel:
// 缺陷列表已移除 other,AI 分类的“其他”类无对应配置缺陷类型 resultError_type = CONFIG_QX_NAME_Panel;
resultError_type = CONFIG_QX_NAME_count;
break; break;
default: default:
break; break;
@ -2195,7 +2187,7 @@ int ImgCheckAnalysisy::BLobToDetResult()
int config_qx_type = blobs.blobTab[i].AIclasstype; int config_qx_type = blobs.blobTab[i].AIclasstype;
if (config_qx_type < 0 || config_qx_type >= CONFIG_QX_NAME_count) if (config_qx_type < 0 || config_qx_type >= CONFIG_QX_NAME_count)
{ {
// AI 分类为“其他”等无对应缺陷类型的情况,不参与缺陷结果分析 // AI 分类无对应缺陷类型(无效类别)时,不参与缺陷结果分析
m_pdetlog->AddCheckstr(PrintLevel_1, DET_LOG_LEVEL_3, "BLobToDetResult", m_pdetlog->AddCheckstr(PrintLevel_1, DET_LOG_LEVEL_3, "BLobToDetResult",
"blob idx %d invalid AIclasstype %d skip", i, config_qx_type); "blob idx %d invalid AIclasstype %d skip", i, config_qx_type);
continue; continue;

@ -47,6 +47,7 @@ enum CONFIG_QX_NAME_
CONFIG_QX_NAME_YiWu, // 分类 异物 CONFIG_QX_NAME_YiWu, // 分类 异物
CONFIG_QX_NAME_C_BianXing, // 分类 C型卡口异常 CONFIG_QX_NAME_C_BianXing, // 分类 C型卡口异常
CONFIG_QX_NAME_PIN_PianYi, // 分类 PIN偏移 CONFIG_QX_NAME_PIN_PianYi, // 分类 PIN偏移
CONFIG_QX_NAME_Panel, // 分类 Panel
CONFIG_QX_NAME_count, CONFIG_QX_NAME_count,
}; };
// 缺陷项对应在参数中的名称 // 缺陷项对应在参数中的名称
@ -60,6 +61,7 @@ static std::vector<std::string> CONFIG_QX_NAME_Names =
"YiWu", "YiWu",
"C_BianXing", "C_BianXing",
"PIN_PianYi", "PIN_PianYi",
"Panel",
}; };
// 分析类型 // 分析类型

@ -945,6 +945,16 @@ int BaseFuntonConfigJson::GetFunction(Json::Value value)
_config.bigNG.qx[CONFIG_QX_NAME_PIN_PianYi].fArea = value_f["form"]["PIN_PianYi"]["Area"].asFloat(); _config.bigNG.qx[CONFIG_QX_NAME_PIN_PianYi].fArea = value_f["form"]["PIN_PianYi"]["Area"].asFloat();
} }
_config.bigNG.qx[CONFIG_QX_NAME_PIN_PianYi].strname = "PIN_PianYi"; _config.bigNG.qx[CONFIG_QX_NAME_PIN_PianYi].strname = "PIN_PianYi";
if (value_f["form"]["Panel"]["open"])
{
_config.bigNG.qx[CONFIG_QX_NAME_Panel].bOpen = value_f["form"]["Panel"]["open"].asBool();
}
if (value_f["form"]["Panel"]["Area"])
{
_config.bigNG.qx[CONFIG_QX_NAME_Panel].fArea = value_f["form"]["Panel"]["Area"].asFloat();
}
_config.bigNG.qx[CONFIG_QX_NAME_Panel].strname = "Panel";
} }
else else
{ {

Loading…
Cancel
Save