Compare commits

...

2 Commits

Author SHA1 Message Date
Mr.V f330b88229 灰度图 中心贴图推理 2024-01-30 10:23:37 +08:00
Mr.V cabdbad267 忽略文件 2024-01-30 10:20:49 +08:00
3 changed files with 16 additions and 5 deletions

7
.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
/build/
/app/
*.tgz
*.tar
*.log
*.o
*.out

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

View File

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