unify the interface with detector
[trackerpp.git] / src / Tracker.h
index c87f465..490201a 100644 (file)
@@ -5,33 +5,47 @@
 #include <string>
 #include <vector>
 #include "Metrics.h"
+#include "SharedPtr.h"
 
 namespace suanzi {
 
-typedef enum 
-{
-    Fire = -1,
-    Active = 2,
-    Lost,
-    Delete
-} TrackerStatus;
-
-class Tracker
-{
-public:
-    Tracker(int id);
-    virtual ~Tracker();
-    void updateState(const cv::Mat& image);
-    void addPatch(Patch* p);
-
-private:
-    TrackerStatus status;
-    TrackerStatus preStatus;
-    int id;
-    int age;
-    int last_active;
-    std::vector<Patch *> patches;
-};
+    typedef enum 
+    {
+        Fire = -1,
+        Active = 2,
+        Lost,
+        Delete
+    } TrackerStatus;
+
+    TK_DECLARE_PTR(Tracker);
+//    TK_DECLARE_PTR(KalmanFilter);
+    class Tracker
+    {
+    public:
+        Tracker(int id);
+        virtual ~Tracker();
+        void updateState(const cv::Mat& image);
+        void addPatch(Patch* p);
+        TrackerStatus status;
+
+    private:
+        TrackerStatus preStatus;
+        int id;
+        int age;
+        int last_active;
+        std::vector<Patch *> patches;
+        cv::KalmanFilter kf = {4,2};
+    };
+
+//    class KalmanFilter
+//    {
+//    public:
+//        KalmanFilter();
+//        ~KalmanFilter();
+//    private:
+//        cv::KalmanFilter
+//
+//    };
 
 
 }