From 6a927399b1d5fd2d0c780014c6df025469e6f56e Mon Sep 17 00:00:00 2001 From: 11566hyc <123456789> Date: Mon, 28 Jul 2025 08:53:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=A4=96=E5=9C=BA=E8=81=94?= =?UTF-8?q?=E8=B0=83=E4=BF=AE=E6=94=B9=EF=BC=9A=201.=E5=AF=B9=E8=B7=9F?= =?UTF-8?q?=E8=B8=AA=E8=BE=93=E5=87=BA=E7=9B=AE=E6=A0=87=E6=8C=89ID?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E6=8E=92=E5=BA=8F=202.=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NeoTracker/src/NeoArithStandardDll.cpp | 23 ++++++++++++++++++++--- QGuideArithStudio/src/Project/S3315.cpp | 3 +++ QGuideArithStudio/src/QVideoPlayer.cpp | 2 +- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/NeoTracker/src/NeoArithStandardDll.cpp b/NeoTracker/src/NeoArithStandardDll.cpp index 3b94a09..fd256a1 100644 --- a/NeoTracker/src/NeoArithStandardDll.cpp +++ b/NeoTracker/src/NeoArithStandardDll.cpp @@ -76,9 +76,9 @@ void ARIDLL_EOArithInitWithMode(ArithHandle hArith, int nWidth, int nHeight, GD_ int ARIDLL_RunController(ArithHandle hArithSrc, GD_VIDEO_FRAME_S img, ARIDLL_INPUTPARA stInputPara, ARIDLL_OUTPUT* pstOutput) { //算法输入信息整理【调试】 - LOG_DEBUG_INPUT("HI_Input:unFrmId:{}, nWidth:{},nHeight:{}, unFreq:{}, fServoAz:{}, fServoPt:{},st.Att.R:{},P:{},Y:{}, fAglReso:{},f, nFocus:{}, fPixelSize:{}, unVideoType:{}", + LOG_DEBUG_INPUT("HI_Input:unFrmId:{}, nWidth:{},nHeight:{}, unFreq:{}, fServoAz:{}, fServoPt:{},st.Att.R:{},P:{},Y:{}, st.Pos.B:{},H:{},L:{}, fAglReso:{},f, nFocus:{}, fPixelSize:{}, unVideoType:{}", stInputPara.unFrmId, img.u32Width, img.u32Height, stInputPara.unFreq, stInputPara.stServoInfo.fServoAz, stInputPara.stServoInfo.fServoPt, stInputPara.stAirCraftInfo.stAtt.fRoll, - stInputPara.stAirCraftInfo.stAtt.fPitch,stInputPara.stAirCraftInfo.stAtt.fYaw, stInputPara.stCameraInfo.fAglReso, + stInputPara.stAirCraftInfo.stAtt.fPitch,stInputPara.stAirCraftInfo.stAtt.fYaw,stInputPara.stAirCraftInfo.stPos.B,stInputPara.stAirCraftInfo.stPos.H,stInputPara.stAirCraftInfo.stPos.L,stInputPara.stCameraInfo.fAglReso, stInputPara.stCameraInfo.nFocus, stInputPara.stCameraInfo.fPixelSize, stInputPara.stCameraInfo.unVideoType); // 获取算法指针 Arith_EOController* pArith = (Arith_EOController*)hArithSrc; @@ -354,7 +354,7 @@ void ARIDLL_GetInputPara(Arith_EOController* pArith, int nWidth, int nHeight, AR // 载机位置 Input->stPlanePos = stInputPara.stAirCraftInfo.stPos; // 当前帧平台姿态 - Input->afPlatformRPY = stInputPara.stAirCraftInfo.stAtt; + Input->afPlatformRPY = { 0 };//stInputPara.stAirCraftInfo.stAtt; // 伺服方位俯仰角 Input->afSvoAgl.fAz = stInputPara.stServoInfo.fServoAz; @@ -636,6 +636,22 @@ void ARIDLL_OutputPipeTarget(Arith_EOController* pArith, ARIDLL_OUTPUT* pstOutpu } } } + + //对输出目标进行排序,防止ARM转发取差量时跳动 + for (int i = 0; i < pstOutput->nTrackObjCnts; i++) + { + ARIDLL_OBJINFO trackObj_temp_i = pstOutput->stTrackers[i]; + for (int j = i+1; j < pstOutput->nTrackObjCnts; j++) + { + //ARIDLL_OBJINFO trackObj_temp_j = pstOutput->stTrackers[j]; + if (pstOutput->stTrackers[j].nOutputID < trackObj_temp_i.nOutputID) + { + pstOutput->stTrackers[i] = pstOutput->stTrackers[j]; + pstOutput->stTrackers[j] = trackObj_temp_i; + } + } + } + if(2 == pstOutput->nStatus)//搜索状态 { if (pstOutput->nAlarmObjCnts > 0) @@ -666,6 +682,7 @@ void ARIDLL_OutputPipeTarget(Arith_EOController* pArith, ARIDLL_OUTPUT* pstOutpu pstOutput->stAlarmObjs[0] = pstOutput->stAlarmObjs[Index]; pstOutput->stAlarmObjs[Index] = TempObj; } + LOG_DEBUG_OUTPUT("stAlarmObjs[0]:nX:{},nY:{}; stTrackers[0]:nX:{},nY:{}", pstOutput->stAlarmObjs[0].nX, pstOutput->stAlarmObjs[0].nY, pstOutput->stTrackers[0].nX, pstOutput->stTrackers[0].nY); } diff --git a/QGuideArithStudio/src/Project/S3315.cpp b/QGuideArithStudio/src/Project/S3315.cpp index 69a37c0..dd99b97 100644 --- a/QGuideArithStudio/src/Project/S3315.cpp +++ b/QGuideArithStudio/src/Project/S3315.cpp @@ -31,6 +31,9 @@ void S3315GetImagePara(unsigned char* pParamDataBuffer, unsigned char* pResultDa memcpy(pParamNO65DataBuffer, pParamDataBuffer + 1280, 640); ImagePara->stServoInfo.fServoAz = calc_fov_by_mil(pParamNO65DataBuffer->B1B0 , 6000) * 6000.0f / 65536.0f; ImagePara->stServoInfo.fServoPt = calc_fov_by_mil(pParamNO65DataBuffer->B3B2, 6000) * 6000.0f / 65536.0f; + ImagePara->stAirCraftInfo.stAtt.fYaw = calc_fov_by_mil(pParamNO65DataBuffer->B1B0, 6000) * 6000.0f / 65536.0f; + ImagePara->stAirCraftInfo.stAtt.fPitch = calc_fov_by_mil(pParamNO65DataBuffer->B3B2, 6000) * 6000.0f / 65536.0f; + ImagePara->stAirCraftInfo.stAtt.fRoll = calc_fov_by_mil(pParamNO65DataBuffer->B5B4, 6000) * 6000.0f / 65536.0f; ImagePara->stCameraInfo.fPixelSize = 25; ImagePara->stCameraInfo.nFocus = 302; ImagePara->unFreq = 50; diff --git a/QGuideArithStudio/src/QVideoPlayer.cpp b/QGuideArithStudio/src/QVideoPlayer.cpp index 4d53f07..82587b0 100644 --- a/QGuideArithStudio/src/QVideoPlayer.cpp +++ b/QGuideArithStudio/src/QVideoPlayer.cpp @@ -1875,7 +1875,7 @@ void QVideoPlayer::DrawPipeAglInfo() auto pPipeArray = ARIDLL_ExportPipeArrayPtr(pEOTracker); - auto PipeNum = m_stDebugOutPut.nMaxPipeNum; + auto PipeNum = 99;//m_stDebugOutPut.nMaxPipeNum; //管道编号对应颜色表 by wcw04046 @ 2019/01/21 UBYTE8 ubClorR[10] = { 200,35,50,75,100,125,155,170,190,200 };