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