|
|
|
|
@ -40,8 +40,7 @@ ImgCheckAnalysisy::ImgCheckAnalysisy()
|
|
|
|
|
m_pbaseCheckFunction = &m_AnalysisyConfig.baseFunction;
|
|
|
|
|
|
|
|
|
|
m_strLastDate = "";
|
|
|
|
|
m_strRootPath_TA_cls = "/home/aidlux/BOE/Cls/TA/";
|
|
|
|
|
m_strRootPath_CA_cls = "/home/aidlux/BOE/Cls/CA/";
|
|
|
|
|
m_strRootPath_KK_cls = "/home/aidlux/BOE/Cls/KK/";
|
|
|
|
|
creatsavedir();
|
|
|
|
|
m_pImageStorage = ImageStorage::getInstance();
|
|
|
|
|
m_nConfigIdx = -1;
|
|
|
|
|
@ -202,12 +201,10 @@ int ImgCheckAnalysisy::creatsavedir()
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
m_strLastDate = curDate;
|
|
|
|
|
m_strRootPath_TA_cls += m_strLastDate + "/";
|
|
|
|
|
m_strRootPath_CA_cls += m_strLastDate + "/";
|
|
|
|
|
m_strRootPath_KK_cls += m_strLastDate + "/";
|
|
|
|
|
for (int i = 0; i < AI_CLass_QX_NAME_count; i++)
|
|
|
|
|
{
|
|
|
|
|
CheckUtil::CreateDir(m_strRootPath_TA_cls + std::to_string(i) + "/");
|
|
|
|
|
CheckUtil::CreateDir(m_strRootPath_CA_cls + std::to_string(i) + "/");
|
|
|
|
|
CheckUtil::CreateDir(m_strRootPath_KK_cls + std::to_string(i) + "/");
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
@ -1680,18 +1677,13 @@ int ImgCheckAnalysisy::AI_QX_Class_Thread()
|
|
|
|
|
// printf("AI Class num %d = %s %f\n", cls_num, strclassName.c_str(), result->cls_score);
|
|
|
|
|
|
|
|
|
|
// 分类存图 开启。
|
|
|
|
|
if (m_pbaseCheckFunction->saveImg.bSaveAlginImg)
|
|
|
|
|
if (m_pbaseCheckFunction->saveImg.bSaveClsImg)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
std::string saveimgpaht = "";
|
|
|
|
|
|
|
|
|
|
if (m_strCurDetChannel == "TA")
|
|
|
|
|
{
|
|
|
|
|
saveimgpaht = m_strRootPath_TA_cls + std::to_string(cls_num) + "/" + std::to_string(CheckUtil::getcurTime()) + "_" + std::to_string(result->cls_score) + ".png";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
saveimgpaht = m_strRootPath_CA_cls + std::to_string(cls_num) + "/" + std::to_string(CheckUtil::getcurTime()) + "_" + std::to_string(result->cls_score) + ".png";
|
|
|
|
|
saveimgpaht = m_strRootPath_KK_cls + std::to_string(cls_num) + "/" + std::to_string(CheckUtil::getcurTime()) + "_" + std::to_string(result->cls_score) + ".png";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
@ -1989,6 +1981,7 @@ int ImgCheckAnalysisy::Pin_Qx_Det(const cv::Mat &img)
|
|
|
|
|
|
|
|
|
|
m_Edge_DetConfig.Init();
|
|
|
|
|
m_Edge_DetConfig.strChannel = m_strCurDetChannel;
|
|
|
|
|
m_Edge_DetConfig.strProductID = DetImgInfo_shareP->strImgProductID;
|
|
|
|
|
m_Edge_DetConfig.pBaseCheckFunction = m_pbaseCheckFunction;
|
|
|
|
|
|
|
|
|
|
m_Edge_DetConfig.bSaveResultImg = false;
|
|
|
|
|
@ -2932,6 +2925,7 @@ int ImgCheckAnalysisy::AI_Edge(const cv::Mat &img, cv::RotatedRect &outerRoi, cv
|
|
|
|
|
config.bSaveResultImg = true;
|
|
|
|
|
}
|
|
|
|
|
config.strChannel = DetImgInfo_shareP->strChannel;
|
|
|
|
|
config.strProductID = DetImgInfo_shareP->strImgProductID;
|
|
|
|
|
config.pBaseCheckFunction = m_pbaseCheckFunction;
|
|
|
|
|
int re = m_pAI_Edge_Algin.Detect(img, &config, m_pEdge_Align_Result);
|
|
|
|
|
if (re != 0)
|
|
|
|
|
|