Fix nan issue in features
[trackerpp.git] / include / Tracker.h
index d528670..7bfcfb0 100644 (file)
@@ -4,7 +4,6 @@
 #include <opencv2/opencv.hpp>
 #include <string>
 #include <vector>
-#include "Metrics.h"
 #include "SharedPtr.h"
 #include "MultiTracker.h"
 #include "Detector.h"
@@ -29,19 +28,19 @@ namespace suanzi {
         void updateState(const cv::Mat& image);
         void addPatch(PatchPtr p);
         void correct(const cv::Mat& image, const Detection& d);
-        TrackerStatus status;
+        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_ */