diff --git a/AlgorithmModule/include/AICommonDefine.h b/AlgorithmModule/include/AICommonDefine.h index 269eac7..2b52cf9 100644 --- a/AlgorithmModule/include/AICommonDefine.h +++ b/AlgorithmModule/include/AICommonDefine.h @@ -14,24 +14,24 @@ enum AI_CLass_QX_NAME_ { 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_LianXi, // 连锡 AI_CLass_QX_NAME_QueXi, // 缺锡 AI_CLass_QX_NAME_YiWu, // 异物 AI_CLass_QX_NAME_C_BianXing, // C型卡口异常 - AI_CLass_QX_NAME_Panel, // Panel AI_CLass_QX_NAME_count, }; // 缺陷项对应在参数中的名称 static const std::string AI_CLass_QX_NAME_Names[] = { "PIN_PoSun", + "PIN_QueShi", "BTB_DuanLie", "LianXi", "QueXi", "YiWu", "C_BianXing", - "Panel", }; #endif \ No newline at end of file diff --git a/AlgorithmModule/src/ImageResultJudge.cpp b/AlgorithmModule/src/ImageResultJudge.cpp index 7757009..c499bde 100644 --- a/AlgorithmModule/src/ImageResultJudge.cpp +++ b/AlgorithmModule/src/ImageResultJudge.cpp @@ -797,32 +797,9 @@ int ImageResultJudge::DrawResult(std::shared_ptr pImageResult) draw_str->txtP = cv::Point(draw_qx->cp.x + r, draw_qx->cp.y - r); draw_str->txtsize = 0.5; draw_str->txtbackgroundk = txtbackgroundk; - cv::Rect srcroi = pqx->srcImgroi; - cv::Point srccp = cv::Point(srcroi.x + srcroi.width * .5, srcroi.y + srcroi.height * 0.5); - - char buffer[128]; - { - std::string text = std::to_string(pqx->idx) + ":" + pqx->strTypeName; - draw_str->strlist.push_back(text); - } - { - sprintf(buffer, " center:%d %d", srccp.x, srccp.y); - std::string text = buffer; - draw_str->strlist.push_back(text); - } - { - sprintf(buffer, " len %0.2f A: %0.2f ", pqx->len, pqx->area); - std::string text = buffer; - draw_str->strlist.push_back(text); - } - { - sprintf(buffer, " breadth %0.2f A: %0.2f ", pqx->breadth, pqx->area); - std::string text = buffer; - draw_str->strlist.push_back(text); - } { - sprintf(buffer, " E:%0.2f hj %0.2f", pqx->energy, pqx->hj); - std::string text = buffer; + // 只绘制 id:缺陷code (缺陷名可能中文乱码, 用code替代) + std::string text = std::to_string(pqx->idx) + ":" + pqx->qx_Code; draw_str->strlist.push_back(text); } sendTask(draw_str); diff --git a/AlgorithmModule/src/ImgCheckAnalysisy.cpp b/AlgorithmModule/src/ImgCheckAnalysisy.cpp index 0376ace..0aade64 100644 --- a/AlgorithmModule/src/ImgCheckAnalysisy.cpp +++ b/AlgorithmModule/src/ImgCheckAnalysisy.cpp @@ -1663,31 +1663,31 @@ int ImgCheckAnalysisy::AI_QX_Class_Thread() break; case 1: - cls_num = AI_CLass_QX_NAME_BTB_DuanLie; + cls_num = AI_CLass_QX_NAME_PIN_QueShi; break; case 2: - cls_num = AI_CLass_QX_NAME_LianXi; + cls_num = AI_CLass_QX_NAME_BTB_DuanLie; break; case 3: - cls_num = AI_CLass_QX_NAME_QueXi; + cls_num = AI_CLass_QX_NAME_LianXi; break; case 4: - cls_num = AI_CLass_QX_NAME_YiWu; + cls_num = AI_CLass_QX_NAME_QueXi; break; case 5: - cls_num = AI_CLass_QX_NAME_C_BianXing; + cls_num = AI_CLass_QX_NAME_YiWu; break; case 6: - cls_num = AI_CLass_QX_NAME_Panel; + cls_num = AI_CLass_QX_NAME_C_BianXing; break; default: - cls_num = AI_CLass_QX_NAME_Panel; + cls_num = AI_CLass_QX_NAME_count; // 无效类别, 不参与缺陷分析 break; } @@ -1956,6 +1956,9 @@ int ImgCheckAnalysisy::AIClassTypeToConfigType(int nAIQXType) case AI_CLass_QX_NAME_PIN_PoSun: resultError_type = CONFIG_QX_NAME_PIN_PoSun; break; + case AI_CLass_QX_NAME_PIN_QueShi: + resultError_type = CONFIG_QX_NAME_PIN_QueShi; + break; case AI_CLass_QX_NAME_BTB_DuanLie: resultError_type = CONFIG_QX_NAME_BTB_DuanLie; break; @@ -1971,9 +1974,6 @@ int ImgCheckAnalysisy::AIClassTypeToConfigType(int nAIQXType) case AI_CLass_QX_NAME_C_BianXing: resultError_type = CONFIG_QX_NAME_C_BianXing; break; - case AI_CLass_QX_NAME_Panel: - resultError_type = CONFIG_QX_NAME_Panel; - break; default: break; }