|
|
|
|
@ -371,28 +371,20 @@ int deal::preCheck()
|
|
|
|
|
setReadThreadStart();
|
|
|
|
|
// 遍历所有图片 开始读图处理
|
|
|
|
|
AllImgNum = 0;
|
|
|
|
|
// 每张图对应一个通道,独立读入送检;多张图(多通道)分别处理,不能合并为 AB 双相机
|
|
|
|
|
for (const auto pcam : product->camera_list)
|
|
|
|
|
{
|
|
|
|
|
std::shared_ptr<JC_IMAGE_INFO_> tem = std::make_shared<JC_IMAGE_INFO_>();
|
|
|
|
|
tem->strCamID = pcam->strCamName;
|
|
|
|
|
for (const auto pimage : pcam->image_list)
|
|
|
|
|
{
|
|
|
|
|
std::shared_ptr<JC_IMAGE_INFO_> tem = std::make_shared<JC_IMAGE_INFO_>();
|
|
|
|
|
tem->strCamID = pcam->strCamName;
|
|
|
|
|
tem->strchannelName = pimage->strchannelName;
|
|
|
|
|
tem->strName = pimage->strName;
|
|
|
|
|
tem->strProductID = pimage->strProductID;
|
|
|
|
|
|
|
|
|
|
if (tem->strPath == "")
|
|
|
|
|
{
|
|
|
|
|
tem->strPath = pimage->strPath;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
tem->strPath_B = pimage->strPath;
|
|
|
|
|
}
|
|
|
|
|
tem->strPath = pimage->strPath;
|
|
|
|
|
InsertReadImgInfo(tem);
|
|
|
|
|
AllImgNum++;
|
|
|
|
|
}
|
|
|
|
|
InsertReadImgInfo(tem);
|
|
|
|
|
AllImgNum++;
|
|
|
|
|
// break;
|
|
|
|
|
}
|
|
|
|
|
// AllImgNum = 1;
|
|
|
|
|
{
|
|
|
|
|
@ -1024,12 +1016,16 @@ int deal::SendImgToCheck(std::shared_ptr<JC_IMAGE_INFO_> pDetImageInfo, IN_IMG_S
|
|
|
|
|
}
|
|
|
|
|
if (status == IN_IMG_Status_End)
|
|
|
|
|
{
|
|
|
|
|
std::shared_ptr<shareImage> tem = std::make_shared<shareImage>();
|
|
|
|
|
tem->strImgProductID = pDetImageInfo->strProductID;
|
|
|
|
|
tem->Status = -1;
|
|
|
|
|
if (m_pALLImgCheckAnalysisy)
|
|
|
|
|
// 一张图上下拆分成两个产品(_0 上半、_1 下半),给两个产品分别发送结束标志
|
|
|
|
|
for (int pi = 0; pi < 2; pi++)
|
|
|
|
|
{
|
|
|
|
|
m_pALLImgCheckAnalysisy->SetDataRun_SharePtr(tem);
|
|
|
|
|
std::shared_ptr<shareImage> tem = std::make_shared<shareImage>();
|
|
|
|
|
tem->strImgProductID = pDetImageInfo->strProductID + "_" + std::to_string(pi);
|
|
|
|
|
tem->Status = -1;
|
|
|
|
|
if (m_pALLImgCheckAnalysisy)
|
|
|
|
|
{
|
|
|
|
|
m_pALLImgCheckAnalysisy->SetDataRun_SharePtr(tem);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
@ -1100,7 +1096,8 @@ int deal::SendImgToCheck(std::shared_ptr<JC_IMAGE_INFO_> pDetImageInfo, IN_IMG_S
|
|
|
|
|
*sub = *tem;
|
|
|
|
|
sub->img = splitList[i];
|
|
|
|
|
sub->strImgProductID = tem->strImgProductID + "_" + std::to_string(i);
|
|
|
|
|
sub->Status = IN_IMG_Status_OneImg;
|
|
|
|
|
// 同一产品(上半/下半)可能包含多个通道的图,子图作为中间图,待所有通道送完后再统一发送结束标志
|
|
|
|
|
sub->Status = IN_IMG_Status_Other;
|
|
|
|
|
if (m_pALLImgCheckAnalysisy)
|
|
|
|
|
{
|
|
|
|
|
re = m_pALLImgCheckAnalysisy->SetDataRun_SharePtr(sub);
|
|
|
|
|
|