RM掉帧算法

以下为掉帧算法的定义部分(Frame.hpp)

#include <deque>
#include <iostream>
static std::deque<ArmorBox> HistoryTarget;
bool IsUnidentify = false;//掉帧常数,true为目标曾被识别到 false为目标曾未被识别到
int unidentify_= 0; //掉帧数
int unidentify_num = 0; //掉帧系数
const int unidentified_threshold = 3; //掉帧系数最小值(超过则为掉帧)
const int not_unidentify_threshold = 10; //掉帧数最大值(超过则不为掉帧)
int drop = 0;
 


bool Framedrop(const ArmorDetector &armorDetector){
       
        if (armorDetector.state == ARMOR_FOUND){//当前帧识别到目标
        if(IsUnidentify == true)//目标曾未别识别过
        {    
           
            
            if(unidentify_ <= not_unidentify_threshold)//掉帧数小于等于掉帧数最大值(排除掉帧过多失去目标的状态)
            {
                unidentify_num++;
                cout<<"掉帧系数"<<unidentify_num<<endl;
                unidentify_ = 0;
                if(unidentify_num > unidentified_thres
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值