74 lines
1.1 KiB
C
74 lines
1.1 KiB
C
|
#pragma once
|
|||
|
#include <iostream>
|
|||
|
#include <opencv2/opencv.hpp>
|
|||
|
|
|||
|
|
|||
|
/**
|
|||
|
* @brief KalmanBoxTracker <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
class KalmanBoxTracker
|
|||
|
{
|
|||
|
public:
|
|||
|
/**
|
|||
|
* @brief KalmanBoxTracker <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>캯<EFBFBD><EFBFBD>
|
|||
|
* @param bbox <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
KalmanBoxTracker(std::vector<int> bbox);
|
|||
|
|
|||
|
/**
|
|||
|
* @brief update ͨ<EFBFBD><EFBFBD><EFBFBD>۲<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ״̬
|
|||
|
* @param bbox <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
void update(std::vector<int> bbox);
|
|||
|
|
|||
|
/**
|
|||
|
* @brief predict <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><EFBFBD><EFBFBD>ı߽<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
std::vector<float> predict();
|
|||
|
|
|||
|
/**
|
|||
|
* @brief get_state <EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
|
|||
|
*/
|
|||
|
std::vector<float> get_state();
|
|||
|
|
|||
|
public:
|
|||
|
/**
|
|||
|
* @param m_kf <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
cv::KalmanFilter* m_kf;
|
|||
|
|
|||
|
/**
|
|||
|
* @param m_time_since_update <EFBFBD>Ӹ<EFBFBD><EFBFBD>¿<EFBFBD>ʼ<EFBFBD><EFBFBD>ʱ<EFBFBD>䣨֡<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
int m_time_since_update;
|
|||
|
|
|||
|
/**
|
|||
|
* @param count <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĸ<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
static int count;
|
|||
|
|
|||
|
/**
|
|||
|
* @param m_id <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>id
|
|||
|
*/
|
|||
|
int m_id;
|
|||
|
|
|||
|
/**
|
|||
|
* @param m_history <EFBFBD><EFBFBD>ʷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
std::vector<std::vector<float>> m_history;
|
|||
|
|
|||
|
/**
|
|||
|
* @param m_hits
|
|||
|
*/
|
|||
|
int m_hits;
|
|||
|
|
|||
|
/**
|
|||
|
* @param m_hit_streak <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֡
|
|||
|
*/
|
|||
|
int m_hit_streak;
|
|||
|
|
|||
|
/**
|
|||
|
* @param m_age predict<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õĴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
int m_age;
|
|||
|
};
|