Add shared ptr
[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     class Tracker
22     {
23     public:
24         Tracker(int id);
25         virtual ~Tracker();
26         void updateState(const cv::Mat& image);
27         void addPatch(Patch* p);
28
29     private:
30         TrackerStatus status;
31         TrackerStatus preStatus;
32         int id;
33         int age;
34         int last_active;
35         std::vector<Patch *> patches;
36     };
37
38
39 }
40
41 #endif /* _TRACKER_H_ */