|
|
|
|
|
/*********版权所有(C)2024,武汉高德红外股份有限公司***************
|
|
|
|
|
|
* 文件名称: Arith_ObjArrest.cpp
|
|
|
|
|
|
* 文件标识: 跟踪目标重捕时机的返回
|
|
|
|
|
|
* 内容摘要:
|
|
|
|
|
|
* 其它说明: "Arith_ObjArrest.cpp"的函数、全局变量、宏定义,统一前缀为简写"ObjArrest_"
|
|
|
|
|
|
* 当前版本: 固化V2.0
|
|
|
|
|
|
* 创建作者: lk
|
|
|
|
|
|
* 创建日期: 2024.01.23
|
|
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
#ifndef __ARITH_OBJ_ARREST_H__
|
|
|
|
|
|
#define __ARITH_OBJ_ARREST_H__
|
|
|
|
|
|
|
|
|
|
|
|
#include "Arith_Common.hpp"
|
|
|
|
|
|
#include "KCF/API_KCF_Tracker.h"
|
|
|
|
|
|
#include "Arith_AITTracker.h"
|
|
|
|
|
|
#include "Arith_OccludeJudge.h"
|
|
|
|
|
|
|
|
|
|
|
|
class TargetArrest
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
TargetArrest(OccJudge* pOccFea, API_KCF_Tracker* pKCFTracker, API_TLD* pTLDTracker);
|
|
|
|
|
|
~TargetArrest();
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
// 与遮挡重捕关联的遮挡判断事件
|
|
|
|
|
|
OccJudge* m_pOccFea;
|
|
|
|
|
|
|
|
|
|
|
|
API_KCF_Tracker* m_pKCFTracker;
|
|
|
|
|
|
API_TLD* m_pTLDTracker;
|
|
|
|
|
|
|
|
|
|
|
|
//重捕调试参数
|
|
|
|
|
|
UBYTE8 m_nArrestKCFStatus;
|
|
|
|
|
|
UBYTE8 m_nArrestAIStatus;
|
|
|
|
|
|
FLOAT32 m_fArrestKcfRes;
|
|
|
|
|
|
|
|
|
|
|
|
//重捕参数设置
|
|
|
|
|
|
BBOOL m_bEnableArrestCorr;
|
|
|
|
|
|
BBOOL m_bEnableArrestAngle;
|
|
|
|
|
|
BBOOL m_bEnableAreestEsay;
|
|
|
|
|
|
SINT32 m_nArrestEsayCnt;
|
|
|
|
|
|
|
|
|
|
|
|
//KCF重捕模块
|
|
|
|
|
|
void TLD_RecaptureKCF_Run(GD_VIDEO_FRAME_S img, PIPE* pLockingPipe,GLB_INPUT* p_GLB_Input);
|
|
|
|
|
|
|
|
|
|
|
|
//AI重捕模块
|
|
|
|
|
|
void TLD_RecaptureDasiamRPN_Run(GD_VIDEO_FRAME_S img, PIPE* pLockingPipe, GLB_INPUT* p_GLB_Input, AIT_Interface* pAITracker);
|
|
|
|
|
|
|
|
|
|
|
|
void AID_RecaptureKCF_Run(GD_VIDEO_FRAME_S img, PIPE* pLockingPipe, GLB_INPUT* p_GLB_Input);
|
|
|
|
|
|
|
|
|
|
|
|
//重捕成功参数更新
|
|
|
|
|
|
void ObjArrest_CleanUpObjArrestInfo(void);
|
|
|
|
|
|
|
|
|
|
|
|
//初始化解锁清理
|
|
|
|
|
|
void ObjArrest_CleanUpAllKCFArrestInfo(void);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//设置重捕参数
|
|
|
|
|
|
void ObjArrest_setArrestCorrPara(BBOOL bEnableArrestCorr);
|
|
|
|
|
|
|
|
|
|
|
|
void ObjArrest_setArrestAnglePara(BBOOL bEnableArrestAngle);
|
|
|
|
|
|
|
|
|
|
|
|
void ObjArrest_setArrestEsayPara(BBOOL bEnableArrestEsay);
|
|
|
|
|
|
|
|
|
|
|
|
void ObjArrest_setArrestEsayCntPara(SINT32 nArrestEsayCnt);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
UINT32 g_GLB_nMaxConfContinueFrame; //最大NN置信度处,相关性确认的连续帧数,避免出现错误重捕
|
|
|
|
|
|
UINT32 g_GLB_nConfShortConfirmContinueFrame; // 相关性确认的连续帧数,避免出现错误重捕
|
|
|
|
|
|
UINT32 g_GLB_nConfLongConfirmContinueFrame; // 相关性确认的连续帧数,避免出现错误重捕
|
|
|
|
|
|
|
|
|
|
|
|
MINMAXRECT brCurrentBoxTLDPre = { 0 }; //记录上一帧TLD检测位置
|
|
|
|
|
|
MINMAXRECT brCurrentBoxNNPre = { 0 };
|
|
|
|
|
|
MINMAXRECT brCurrentBoxNNPreAI = { 0 };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UBYTE8 m_bRecaptureKCF; //TLD_KCF重捕成功标志位
|
|
|
|
|
|
UBYTE8 m_bRecaptureAI; //TLD_DaSiamRPN重捕成功标志位
|
|
|
|
|
|
UINT32 m_ArrestCntKCF; //TLD_KCF重捕帧计数
|
|
|
|
|
|
UINT32 m_ArrestCntAI; //TLD_DaSiamRPN重捕帧计数
|
|
|
|
|
|
UBYTE8 m_nContiFrameCnt; //DaSiamRPN重捕连续帧计数
|
|
|
|
|
|
UBYTE8 m_nNNContiFrameCnt; //第二条成功重捕连续帧计数
|
|
|
|
|
|
SINT32 m_nDelayArrestCnt; //延时重捕帧计数
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|