unify the interface with detector
[trackerpp.git] / src / Tracker.h
1 #ifndef _TRACKER_H_
2 #define _TRACKER_H_
3
4 #include <opencv2/opencv.hpp>
5 #include <string>
6 #include <vector>
7 #include "Metrics.h"
8 #include "SharedPtr.h"
9
10 namespace suanzi {
11
12     typedef enum 
13     {
14         Fire = -1,
15         Active = 2,
16         Lost,
17         Delete
18     } TrackerStatus;
19
20     TK_DECLARE_PTR(Tracker);
21 //    TK_DECLARE_PTR(KalmanFilter);
22     class Tracker
23     {
24     public:
25         Tracker(int id);
26         virtual ~Tracker();
27         void updateState(const cv::Mat& image);
28         void addPatch(Patch* p);
29         TrackerStatus status;
30
31     private:
32         TrackerStatus preStatus;
33         int id;
34         int age;
35         int last_active;
36         std::vector<Patch *> patches;
37         cv::KalmanFilter kf = {4,2};
38     };
39
40 //    class KalmanFilter
41 //    {
42 //    public:
43 //        KalmanFilter();
44 //        ~KalmanFilter();
45 //    private:
46 //        cv::KalmanFilter
47 //
48 //    };
49
50
51 }
52
53 #endif /* _TRACKER_H_ */