稍微调整传输数据格式

master
zhou.mengjia 2 years ago
parent 6fee0af59b
commit c05f3c0ee0

Binary file not shown.

Binary file not shown.

@ -424,6 +424,7 @@ Q_SLOT void SmokeBoxIdentification::onDecodeMsg(const QString& msg)
m_currtIntoStockInfo.stockLocation = strList.at(4); m_currtIntoStockInfo.stockLocation = strList.at(4);
m_currtIntoStockInfo.smokeTypeNum = strList.at(5); m_currtIntoStockInfo.smokeTypeNum = strList.at(5);
m_currtIntoStockInfo.smokeQuantity = strList.at(6); m_currtIntoStockInfo.smokeQuantity = strList.at(6);
m_currtIntoStockInfo.imagesPathList.clear();
captureSide(m_currtIntoStockInfo.stockLocation.toInt(),m_currtIntoStockInfo.Floor); captureSide(m_currtIntoStockInfo.stockLocation.toInt(),m_currtIntoStockInfo.Floor);
} }
else if (strList.at(0) == START_CALCULATE && strList.length() == 7) else if (strList.at(0) == START_CALCULATE && strList.length() == 7)
@ -440,6 +441,7 @@ Q_SLOT void SmokeBoxIdentification::onDecodeMsg(const QString& msg)
m_currtStockCheckInfo.stockLocation = strList.at(4); m_currtStockCheckInfo.stockLocation = strList.at(4);
m_currtStockCheckInfo.smokeTypeNum = strList.at(5); m_currtStockCheckInfo.smokeTypeNum = strList.at(5);
m_currtStockCheckInfo.smokeQuantity = strList.at(6); m_currtStockCheckInfo.smokeQuantity = strList.at(6);
m_currtStockCheckInfo.imagesPathList.clear();
m_stocketList.insert(m_currtStockCheckInfo.id.toInt(), m_currtStockCheckInfo); m_stocketList.insert(m_currtStockCheckInfo.id.toInt(), m_currtStockCheckInfo);
calculate(m_currtStockCheckInfo.id.toInt()); calculate(m_currtStockCheckInfo.id.toInt());
} }
@ -497,7 +499,7 @@ void SmokeBoxIdentification::calculate(int stocketID)
m_stocketList[stocketID].smokeTypeNumRlt = typeNum; m_stocketList[stocketID].smokeTypeNumRlt = typeNum;
FileInfo fileInfo = imgInfo.saveImgInfo; FileInfo fileInfo = imgInfo.saveImgInfo;
QString fileName = QString("%1_%2_rlt%3").arg(fileInfo.strId) QString fileName = QString("%1_%2_rlt%3").arg(fileInfo.strId)
.arg(m_currtStockCheckInfo.smokeTypeNum).arg(fileInfo.suffix); .arg(m_currtStockCheckInfo.smokeTypeNum).arg(".jpg");
QString filePath = QString("%1\\%2").arg(dataSaveFolder).arg(fileName); QString filePath = QString("%1\\%2").arg(dataSaveFolder).arg(fileName);
m_pCategoryMatcher->saveResultsImage(filePath); m_pCategoryMatcher->saveResultsImage(filePath);
@ -508,7 +510,7 @@ void SmokeBoxIdentification::calculate(int stocketID)
{ {
str = QString("[%1]:Camera %2 Match Failed!").arg(stocket.id).arg(imgInfo.cameraSn); str = QString("[%1]:Camera %2 Match Failed!").arg(stocket.id).arg(imgInfo.cameraSn);
qWarning() << str; qWarning() << str;
QString filePath = dataSaveFolder + QString("\\%1_error.PNG") QString filePath = dataSaveFolder + QString("\\%1_error.jpg")
.arg(stocket.smokeTypeNum); .arg(stocket.smokeTypeNum);
m_pCategoryMatcher->saveResultsImage(filePath); m_pCategoryMatcher->saveResultsImage(filePath);
m_stocketList[stocketID].imagesPathList.append(filePath.right(filePath.length() - 1)); m_stocketList[stocketID].imagesPathList.append(filePath.right(filePath.length() - 1));
@ -642,22 +644,21 @@ void SmokeBoxIdentification::calculate(int stocketID)
if (bRlt3D) if (bRlt3D)
{ {
m_stocketList[stocketID].smokeQuantityRlt = m_stocketList[stocketID].smokeQuantity; m_stocketList[stocketID].smokeQuantityRlt = m_stocketList[stocketID].smokeQuantity;
m_stocketList[stocketID].correctness = true;
} }
else else
{ {
m_stocketList[stocketID].smokeQuantityRlt = "0"; m_stocketList[stocketID].smokeQuantityRlt = "0";
m_stocketList[stocketID].correctness = false;
} }
if (!bRlt) if (!bRlt)
{ {
m_stocketList[stocketID].smokeTypeNumRlt = "0"; m_stocketList[stocketID].smokeTypeNumRlt = "0";
m_stocketList[stocketID].smokeQuantityRlt = "0"; m_stocketList[stocketID].smokeQuantityRlt = "0";
}
if (!bRlt || m_stocketList[stocketID].smokeQuantity!= m_stocketList[stocketID].smokeQuantityRlt)
{
m_stocketList[stocketID].correctness = false; m_stocketList[stocketID].correctness = false;
} }
sendResults(MsgType::StockCheckResult,stocketID); sendResults(MsgType::StockCheckResult,stocketID);
}); });
} }

Loading…
Cancel
Save