灰度图 中心贴图推理
This commit is contained in:
parent
cabdbad267
commit
f330b88229
|
@ -173,6 +173,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;
|
||||||
//防止停车导致速度过小
|
//防止停车导致速度过小
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -212,6 +214,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;
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue