|
|
|
|
@ -2938,6 +2938,9 @@ int ImgCheckAnalysisy::AI_Detect_QX()
|
|
|
|
|
|
|
|
|
|
cv::Rect srcsize_roi = result->roi;
|
|
|
|
|
|
|
|
|
|
// 模型原始输出(无屏蔽),用于与 TestAIDet 的 out 图对比
|
|
|
|
|
cv::Mat AIresult_raw = AIresult.clone();
|
|
|
|
|
|
|
|
|
|
// 2、 屏蔽 缺陷
|
|
|
|
|
AIresult.setTo(0, shieldImg(result->roi));
|
|
|
|
|
|
|
|
|
|
@ -2975,19 +2978,15 @@ int ImgCheckAnalysisy::AI_Detect_QX()
|
|
|
|
|
// AI检测残点图存图
|
|
|
|
|
if (DetImgInfo_shareP->bDebugsaveImg)
|
|
|
|
|
{
|
|
|
|
|
bool bNeedSave = false;
|
|
|
|
|
std::string roi_ext = "[" + std::to_string(result->roi.x) + "," + std::to_string(result->roi.y) + "]";
|
|
|
|
|
|
|
|
|
|
bNeedSave = true;
|
|
|
|
|
|
|
|
|
|
if (bNeedSave && !AIresult.empty())
|
|
|
|
|
std::string roi_ext = "[" + std::to_string(result->roi.x) + "," + std::to_string(result->roi.y) + "]";
|
|
|
|
|
std::string strSaveDir = "/home/aidlux/BOE/FOG/AI_Detect/" + DetImgInfo_shareP->strImgProductID + "/";
|
|
|
|
|
CheckUtil::CreateDir(strSaveDir);
|
|
|
|
|
std::string strSavePath_in = strSaveDir + m_strCurDetChannel +"_"+ roi_ext + "_"+ "in" + ".png";
|
|
|
|
|
std::string strSavePath_out = strSaveDir + m_strCurDetChannel +"_"+ roi_ext + "_"+ "out" + ".png";
|
|
|
|
|
std::string strSavePath_out_raw = strSaveDir + m_strCurDetChannel +"_"+ roi_ext + "_"+ "out_raw" + ".png";
|
|
|
|
|
cv::imwrite(strSavePath_in, result->input);
|
|
|
|
|
cv::imwrite(strSavePath_out, AIresult);
|
|
|
|
|
cv::imwrite(strSavePath_out_raw, AIresult_raw);
|
|
|
|
|
nSaveCnt++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|