Add resources folder
[trackerpp.git] / include / Tracker.h
index aaa3d1b..88d041a 100644 (file)
@@ -24,23 +24,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<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_ */