X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;ds=sidebyside;f=include%2FTracker.h;h=7bfcfb0c0a06b99edbd65224b6c240f913368c7b;hb=HEAD;hp=aaa3d1b4583676eac00f075266d4044b9ca867a2;hpb=db369d962b595544373b417ae9a76e7268eb12fb;p=trackerpp.git diff --git a/include/Tracker.h b/include/Tracker.h index aaa3d1b..7bfcfb0 100644 --- a/include/Tracker.h +++ b/include/Tracker.h @@ -4,7 +4,6 @@ #include #include #include -#include "Metrics.h" #include "SharedPtr.h" #include "MultiTracker.h" #include "Detector.h" @@ -24,23 +23,24 @@ namespace suanzi { 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 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_ */