灰度图 中心贴图推理

This commit is contained in:
Mr.V 2024-01-30 10:23:37 +08:00
parent cabdbad267
commit f330b88229
2 changed files with 9 additions and 5 deletions

View File

@ -174,6 +174,8 @@ APP_ERROR TrainParationMgr::Process()
// LogInfo << "TrainAnaEngine checkPartion bPartion == true lstPartInfo[nPrePartionIndex].ftime" << abs(lstPartInfo[nPrePartionIndex].i64EndTimeStamp - lstPartInfo[nPrePartionIndex].i64StartTimeStamp);
// 根据时间戳计算时间差
LogInfo << "-测试-----测试-----测试------测试-";
float nTimePassed = (abs(lstPartInfo[nPartionIndex].i64EndTimeStamp - lstPartInfo[nPartionIndex].i64StartTimeStamp)) * 1.0;
//防止停车导致速度过小
if(pPartionInfo->nStatus != TRAIN_PAUSE && nTimePassed <= 50000) {
@ -193,7 +195,7 @@ APP_ERROR TrainParationMgr::Process()
//LogInfo << "TrainAnaEngine checkPartion bPartion == true lstPartInfo[nPrePartionIndex].endframe" << lstPartInfo[nPrePartionIndex].endframe;
lstPartInfo[nPartionIndex].bmodelconfirmed = true;
}
LogInfo << "-测试3-----测试3-----测试3------测试3-";
/// write json info to file
@ -213,6 +215,8 @@ APP_ERROR TrainParationMgr::Process()
//检测到车厢划分信息
{
LogInfo << "-测试2-----测试2-----测试2------测试2-";
// if (nPartionIndex == 0) {
// lstPartInfo[nPartionIndex].endframe = lstPartInfo[nPartionIndex].endframe - nrightoffset * (lstPartInfo[nPartionIndex].fLTX - METHOD_BASE_WIDTH) / 10;
// } else {

View File

@ -464,12 +464,12 @@ void yolov5_preprocess_kernel_img(
s2d.value[0] = scale;
s2d.value[1] = 0;
s2d.value[2] = 0; //左上顶点贴图
// s2d.value[2] = -scale * src_width * 0.5 + dst_width * 0.5; //中心贴图
// s2d.value[2] = 0; //左上顶点贴图
s2d.value[2] = -scale * src_width * 0.5 + dst_width * 0.5; //中心贴图
s2d.value[3] = 0;
s2d.value[4] = scale;
s2d.value[5] = 0; //左上顶点贴图
// s2d.value[5] = -scale * src_height * 0.5 + dst_height * 0.5; //中心贴图
// s2d.value[5] = 0; //左上顶点贴图
s2d.value[5] = -scale * src_height * 0.5 + dst_height * 0.5; //中心贴图
cv::Mat m2x3_s2d(2, 3, CV_32F, s2d.value);
cv::Mat m2x3_d2s(2, 3, CV_32F, d2s.value);