From b57ad52a0d0fd0298414fc27ed6b7284b0f8e1e2 Mon Sep 17 00:00:00 2001 From: yll <1750112338@qq.com> Date: Fri, 15 Aug 2025 20:11:23 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E5=B1=8F=E8=94=BD=E7=AE=A1?= =?UTF-8?q?=E9=81=93=E8=BE=93=E5=87=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NeoTracker/src/Common/Arith_SysStruct.h | 3 ++ NeoTracker/src/NeoArithStandardDll.cpp | 21 ++++++++ NeoTracker/src/NeoArithStandardDll.h | 15 ++++++ QGuideArithStudio/src/ArithControlForm.cpp | 12 ++++- QGuideArithStudio/src/ArithControlForm.h | 2 + QGuideArithStudio/src/ArithControlForm.ui | 59 +++++++++++++++++++++- 6 files changed, 109 insertions(+), 3 deletions(-) diff --git a/NeoTracker/src/Common/Arith_SysStruct.h b/NeoTracker/src/Common/Arith_SysStruct.h index fac0bbb..fc05ab2 100644 --- a/NeoTracker/src/Common/Arith_SysStruct.h +++ b/NeoTracker/src/Common/Arith_SysStruct.h @@ -516,6 +516,9 @@ typedef struct tagGlbParameters BBOOL bGuideCanLockSAPipe; //导引锁定AI无法识别目标开关 SINT16 nSkyLinePointsNum; // 实际外部标定点个数 ANGLE32F skyLinePoints[GLB_SKYLINE_MAX_POINT]; // 天地线标定点数组 + + BBOOL bFiteredAlarm; // 告警屏蔽使能开关 + FLOAT32 fFilterPt; // 告警过滤俯仰角 } GLB_PARAMETERS; // ++++++++定义算法每帧输入信息 diff --git a/NeoTracker/src/NeoArithStandardDll.cpp b/NeoTracker/src/NeoArithStandardDll.cpp index 8fc63c4..26b49c9 100644 --- a/NeoTracker/src/NeoArithStandardDll.cpp +++ b/NeoTracker/src/NeoArithStandardDll.cpp @@ -599,6 +599,10 @@ void ARIDLL_OutputPipeTarget(Arith_EOController* pArith, ARIDLL_OUTPUT* pstOutpu { if (pstOutput->nAlarmObjCnts < ST_OBJ_NUM - 1) { + if (pArith->g_GLB_stPara.bFiteredAlarm && obj.fPt < pArith->g_GLB_stPara.fFilterPt) + { + continue; + } memcpy(pt_detObj, &obj, sizeof(ARIDLL_OBJINFO)); pstOutput->nAlarmObjCnts++; } @@ -867,4 +871,21 @@ STD_TRACKER_API int ARIDLL_Sort_PipeByDistance(ArithHandle hArithSrc, ARIDLL_OUT } } return Index; +} + +STD_TRACKER_API void ARIDLL_Filter_Alarm_Pipe(ArithHandle hArithSrc, int nX, int nY, bool bFitered) +{ + Arith_EOController* pArith = (Arith_EOController*)hArithSrc; + + POINT32F pfCenPos = {FLOAT32(nX), FLOAT32(nY)}; + //// 转惯性系 + Pole polenue = getStablePoleFromImagePos(pfCenPos, + pArith->g_GLB_stInput.stCamera, + pArith->g_GLB_stInput.servoInfo, + pArith->g_GLB_stInput.afPlatformRPY, + pArith->g_GLB_stInput.setupErr); + + // 目标角度赋值为大地坐标系 + pArith->g_GLB_stPara.fFilterPt = (FLOAT32)polenue.alpha; + pArith->g_GLB_stPara.bFiteredAlarm = bFitered; } \ No newline at end of file diff --git a/NeoTracker/src/NeoArithStandardDll.h b/NeoTracker/src/NeoArithStandardDll.h index b7f0911..bc15ed7 100644 --- a/NeoTracker/src/NeoArithStandardDll.h +++ b/NeoTracker/src/NeoArithStandardDll.h @@ -445,6 +445,21 @@ STD_TRACKER_API int ARIDLL_Sort_PipeByDistance(ArithHandle hArithSrc, ARIDLL_OUT *********************************************************/ STD_TRACKER_API bool ARIDLL_Read_Config(ArithHandle hArithSrc, const char* ConfigPath); +/************************************* +* 函数名称: ARIDLL_Filter_Alarm_Pipe() +* 功能描述: 3315新增需求,给定坐标点和使能标记,对低于坐标点俯仰角度的管道进行屏蔽 +* 创建日期: 2025/8/15 +* 输入参数: ArithHandle hArithSrc:算法句柄 +* 输入参数: int nX:屏蔽下发x坐标点 +* 输入参数: int nY:屏蔽下发y坐标点 +* 输入参数: bool bFitered:屏蔽下发使能开关 +* 输出参数: 无 +* 返回值: STD_TRACKER_API void +* 调用关系: 无 +* 其它说明: 无 +*************************************/ +STD_TRACKER_API void ARIDLL_Filter_Alarm_Pipe(ArithHandle hArithSrc, int nX, int nY, bool bFitered); + #ifdef __cplusplus } #endif diff --git a/QGuideArithStudio/src/ArithControlForm.cpp b/QGuideArithStudio/src/ArithControlForm.cpp index 336bf3e..ecbf968 100644 --- a/QGuideArithStudio/src/ArithControlForm.cpp +++ b/QGuideArithStudio/src/ArithControlForm.cpp @@ -87,6 +87,16 @@ void ArithControlForm::testCmd() ARIDLL_GuideLockMultiCommand(pEOTracker, guideList,1); } +void ArithControlForm::testAlarmFilter() +{ + bool bFitered = ui->lineEdit_Filter->text().toInt(); + int nX = ui->lineEdit_Filter_X->text().toInt(); + int nY = ui->lineEdit_Filter_Y->text().toInt(); + + ARIDLL_Filter_Alarm_Pipe(pEOTracker, nX, nY, bFitered); +} + + void ArithControlForm::ChangeLockRect() { QPushButton* button = qobject_cast(sender()); @@ -187,7 +197,7 @@ void ArithControlForm::InitUIStatus() connect(ui->pushButton_GuideCMD, &QPushButton::clicked, this, &ArithControlForm::testCmd); connect(ui->Button_readJson, &QPushButton::clicked, this, &ArithControlForm::readJson); connect(ui->Button_saveJson, &QPushButton::clicked, this, &ArithControlForm::writeJson); - + connect(ui->pushButton_AlarmFilterCMD, &QPushButton::clicked, this, &ArithControlForm::testAlarmFilter); // 接口测试 diff --git a/QGuideArithStudio/src/ArithControlForm.h b/QGuideArithStudio/src/ArithControlForm.h index c866a26..0eb6808 100644 --- a/QGuideArithStudio/src/ArithControlForm.h +++ b/QGuideArithStudio/src/ArithControlForm.h @@ -55,6 +55,8 @@ public slots: void testCmd(); + void testAlarmFilter(); + void ChangeLockRect(); void CMD_testLockByID(); diff --git a/QGuideArithStudio/src/ArithControlForm.ui b/QGuideArithStudio/src/ArithControlForm.ui index 8784434..eb49476 100644 --- a/QGuideArithStudio/src/ArithControlForm.ui +++ b/QGuideArithStudio/src/ArithControlForm.ui @@ -45,7 +45,7 @@ - 0 + 1 @@ -280,6 +280,7 @@ + 75 true @@ -317,6 +318,7 @@ + 75 true @@ -397,6 +399,7 @@ + 75 true @@ -472,7 +475,7 @@ 多目标 - true + true @@ -784,6 +787,58 @@ + + + + 170 + 210 + 161 + 133 + + + + 告警屏蔽 + + + + + + + + + x坐标 + + + + + + + + + + y坐标 + + + + + + + 屏蔽触发 + + + + + + + 使能开关 + + + + + + + +