#include <opencv2/opencv.hpp>
#include <string>
#include <vector>
-#include "Metrics.h"
#include "SharedPtr.h"
#include "MultiTracker.h"
#include "Detector.h"
class Tracker
{
public:
- Tracker(const cv::Mat& image, int id = 0);
+ Tracker(const cv::Mat& image, const Detection& d, int id = 0);
virtual ~Tracker();
void updateState(const cv::Mat& image);
void addPatch(PatchPtr p);
- TrackerStatus status;
+ void correct(const cv::Mat& image, const Detection& d);
+ void predict();
std::vector<PatchPtr> patches;
Detection detection;
+ TrackerStatus status = TrackerStatus::Fire;
+ static constexpr int MaxPatch = 5;
private:
- TrackerStatus preStatus;
+ TrackerStatus preStatus = TrackerStatus::Fire;
int id;
- int age;
- int last_active;
- cv::KalmanFilter kf = {4,2};
+ int age = 1;
+ int last_active = 1;
+ cv::KalmanFilter KF = {4,2};
};
-
-
}
#endif /* _TRACKER_H_ */