贵州西洋修改版
This commit is contained in:
parent
b46d2730cc
commit
6fc795815f
|
|
@ -43,6 +43,12 @@ APP_ERROR SaveDebugImageEngine::Process()
|
|||
}
|
||||
|
||||
std::shared_ptr<VStep2OutputData> pVStep2OutputData = std::static_pointer_cast<VStep2OutputData>(pvoidd);
|
||||
|
||||
if (pVStep2OutputData->cvImage.empty())
|
||||
{
|
||||
LogWarn << " 帧:" << pVStep2OutputData->iFrameId << " 数据源:" << pVStep2OutputData->iDataSource << " debug图像为空";
|
||||
continue;
|
||||
}
|
||||
cv::Mat image = pVStep2OutputData->cvImage.clone();
|
||||
|
||||
std::string strDataDir = this->baseConfig_.strDebugResultPath + "/"
|
||||
|
|
|
|||
|
|
@ -43,6 +43,14 @@ APP_ERROR SaveMoveImageEngine::Process()
|
|||
|
||||
std::shared_ptr<SaveImgData> pSaveImgData = std::static_pointer_cast<SaveImgData>(pvoidd);
|
||||
|
||||
if (pSaveImgData->cvImage.empty())
|
||||
{
|
||||
LogWarn << "图片异常,跳过";
|
||||
continue;
|
||||
}
|
||||
|
||||
cv::Mat image = pSaveImgData->cvImage.clone();
|
||||
|
||||
//图片绝对路径
|
||||
if (pSaveImgData->strFilePath.back() != '/')
|
||||
{
|
||||
|
|
@ -56,9 +64,7 @@ APP_ERROR SaveMoveImageEngine::Process()
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!pSaveImgData->cvImage.empty())
|
||||
{
|
||||
if (cv::imwrite(strImgFilePath, pSaveImgData->cvImage, this->vecCompressionParams_))
|
||||
if (cv::imwrite(strImgFilePath, image, this->vecCompressionParams_))
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
@ -66,6 +72,5 @@ APP_ERROR SaveMoveImageEngine::Process()
|
|||
LogError << "图片存储失败:" << strImgFilePath;
|
||||
}
|
||||
}
|
||||
}
|
||||
return APP_ERR_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue