feat 添加午后处理AI_OUT存图

dev_lsy
liusiyang 2 months ago
parent d9277a9c6e
commit 44b9b8eae5

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

Loading…
Cancel
Save