|
|
|
|
@ -2113,6 +2113,8 @@ int ImgCheckAnalysisy::ConfigCheck(cv::Mat img)
|
|
|
|
|
|
|
|
|
|
int ImgCheckAnalysisy::AI_Detect_Thread(const cv::Mat &img, cv::Mat &ResultImg)
|
|
|
|
|
{
|
|
|
|
|
std::string cur_time_s = CheckUtil::getCurTimeHMS();
|
|
|
|
|
|
|
|
|
|
std::shared_ptr<AIModel_Base> pAIDet;
|
|
|
|
|
// printf("=====>>>>AI_Detect_Thread m_strCurDetChannel %s \n", m_strCurDetChannel.c_str());
|
|
|
|
|
bool bUseDarkModel = false;
|
|
|
|
|
@ -2222,12 +2224,12 @@ int ImgCheckAnalysisy::AI_Detect_Thread(const cv::Mat &img, cv::Mat &ResultImg)
|
|
|
|
|
|
|
|
|
|
if (m_pbaseCheckFunction->saveImg.bSaveAIDetImg && !ResultImg.empty())
|
|
|
|
|
{
|
|
|
|
|
std::string strSaveDir = "/home/aidlux/BOE/AI_Detect/KK/" + DetImgInfo_shareP->strImgProductID + "/";
|
|
|
|
|
std::string strSaveDir = "/home/aidlux/BOE/AI_Detect/" + DetImgInfo_shareP->strImgProductID + "/";
|
|
|
|
|
CheckUtil::CreateDir(strSaveDir);
|
|
|
|
|
std::string strSavePath_in = strSaveDir + m_strCurDetChannel + "_in.png";
|
|
|
|
|
std::string strSavePath_out = strSaveDir + m_strCurDetChannel + "_out.png";
|
|
|
|
|
cv::imwrite(strSavePath_in, inputImg);
|
|
|
|
|
cv::imwrite(strSavePath_out, ResultImg);
|
|
|
|
|
std::string strSavePath_in = strSaveDir + cur_time_s + "_" + strCameraName + "_in.png";
|
|
|
|
|
std::string strSavePath_out = strSaveDir + cur_time_s + "_" + strCameraName + "_out.png";
|
|
|
|
|
CheckUtil::SaveImgAsync(strSavePath_in, m_CheckResult_shareP->cutSrcimg);
|
|
|
|
|
CheckUtil::SaveImgAsync(strSavePath_out, ResultImg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 临时存图
|
|
|
|
|
|