fix 批量跑进行拼接

dev_lsy
liusiyang 3 weeks ago
parent a86bd821b6
commit 740cc346e6

@ -2376,11 +2376,27 @@ int deal::Det_OneProduct_Cell_ET(std::string strProductName, int Idx)
int AllImgNum = detImgInfoList.size();
// 遍历所有图片 开始读图处理
for (int i = 0; i < detImgInfoList.size(); i++)
// 按相机分组,同相机内每两张配对 (BCAA+BCAB 拼接送检,与 preCheck 一致)
std::map<std::string, std::vector<int>> camGroups;
for (int i = 0; i < (int)detImgInfoList.size(); i++)
{
std::shared_ptr<JC_IMAGE_INFO_> tem = std::make_shared<JC_IMAGE_INFO_>();
tem->copy(detImgInfoList.at(i));
InsertReadImgInfo(tem);
camGroups[detImgInfoList[i].strCamID].push_back(i);
}
AllImgNum = 0;
for (auto& kv : camGroups)
{
auto& indices = kv.second;
for (size_t i = 0; i < indices.size(); i += 2)
{
std::shared_ptr<JC_IMAGE_INFO_> tem = std::make_shared<JC_IMAGE_INFO_>();
tem->copy(detImgInfoList.at(indices[i]));
if (i + 1 < indices.size())
{
tem->strPath_B = detImgInfoList.at(indices[i + 1]).strPath;
}
InsertReadImgInfo(tem);
AllImgNum++;
}
}
m_DetResult.startTime_S = getcurTime();
IN_IMG_Status_ temstatus = IN_IMG_Status_Start;

Loading…
Cancel
Save