update 改为简单拼接

dev_lsy
liusiyang 3 weeks ago
parent 4643bc12d0
commit 3655110ce2

@ -160,8 +160,22 @@ int CameraCheckAnalysisy::Detect_Pre()
} }
// printf("===66666666666666666\n"); // printf("===66666666666666666\n");
int re = Mergimg(pImageResult->result->in_shareImage->img, pImageResult->result->in_shareImage->img_B, // int re = Mergimg(pImageResult->result->in_shareImage->img, pImageResult->result->in_shareImage->img_B,
pImageResult->result->in_shareImage->strCameraName, pImageResult->result->in_shareImage->strChannel); // pImageResult->result->in_shareImage->strCameraName, pImageResult->result->in_shareImage->strChannel);
// int re = MergimgTest(pImageResult->result->in_shareImage->img, pImageResult->result->in_shareImage->img_B,
// pImageResult->result->in_shareImage->strCameraName, pImageResult->result->in_shareImage->strChannel);
// 简单硬拼接img 在左img_B 在右,拼接结果写回 img
if (pImageResult->result->in_shareImage->img.size() != pImageResult->result->in_shareImage->img_B.size() ||
pImageResult->result->in_shareImage->img.type() != pImageResult->result->in_shareImage->img_B.type())
{
m_pdetlog->AddCheckstr(PrintLevel_1, "Detect_Pre", "Cam %s ==================img size/type != img_B ", strBasic.c_str());
return 1;
}
cv::Mat merge_img;
cv::hconcat(pImageResult->result->in_shareImage->img, pImageResult->result->in_shareImage->img_B, merge_img);
pImageResult->result->in_shareImage->img = merge_img;
// 拼接完成后 img_B 不再需要,立即释放内存 // 拼接完成后 img_B 不再需要,立即释放内存
pImageResult->result->in_shareImage->img_B.release(); pImageResult->result->in_shareImage->img_B.release();

@ -182,7 +182,7 @@ int ImgCheckAnalysisy::GetStatus()
std::string ImgCheckAnalysisy::GetVersion() std::string ImgCheckAnalysisy::GetVersion()
{ {
return std::string("BOE_1.0.0"); return std::string("BOE_1.1.0");
} }
std::string ImgCheckAnalysisy::GetErrorInfo() std::string ImgCheckAnalysisy::GetErrorInfo()

@ -287,24 +287,26 @@ std::string Extract_ALL::Extract_Channel_Name(std::string strPath, int userflag)
} }
int Extract_ALL::Read_Image_List(std::string strPath, std::string strproduct) int Extract_ALL::Read_Image_List(std::string strPath, std::string strproduct)
{ {
std::string strSearchImgPath = strPath + "/*.jpg"; std::vector<std::string> imgExts = {"*.jpg", "*.png", "*.bmp", "*.tif"};
Read_Camera_Product_Image(strSearchImgPath, 0, strproduct); for (const auto &ext : imgExts)
{
strSearchImgPath = strPath + "/*.ytimage"; std::string strSearchImgPath = strPath + "/" + ext;
Read_Camera_Product_Image(strSearchImgPath, 0, strproduct); Read_Camera_Product_Image(strSearchImgPath, 0, strproduct);
}
return 0; return 0;
} }
int Extract_ALL::Read_Image_List(std::string strPath_left, std::string strPath_right, std::string strproduct) int Extract_ALL::Read_Image_List(std::string strPath_left, std::string strPath_right, std::string strproduct)
{ {
std::string strSearchImgPath = strPath_left + "/*.jpg"; std::vector<std::string> imgExts = {"*.jpg", "*.png", "*.bmp", "*.tif"};
Read_Camera_Product_Image(strSearchImgPath, 0, strproduct); for (const auto &ext : imgExts)
strSearchImgPath = strPath_right + "/*.jpg"; {
Read_Camera_Product_Image(strSearchImgPath, 0, strproduct); std::string strSearchImgPath = strPath_left + "/" + ext;
Read_Camera_Product_Image(strSearchImgPath, 0, strproduct);
// strSearchImgPath = strPath + "/*.jpg"; strSearchImgPath = strPath_right + "/" + ext;
// Read_Camera_Product_Image(strSearchImgPath, 1); Read_Camera_Product_Image(strSearchImgPath, 0, strproduct);
}
return 0; return 0;
} }

Loading…
Cancel
Save