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 };