projects
/
trackerpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix nan issue in features
[trackerpp.git]
/
include
/
Tracker.h
diff --git
a/include/Tracker.h
b/include/Tracker.h
index
490201a
..
7bfcfb0
100644
(file)
--- a/
include/Tracker.h
+++ b/
include/Tracker.h
@@
-4,11
+4,14
@@
#include <opencv2/opencv.hpp>
#include <string>
#include <vector>
#include <opencv2/opencv.hpp>
#include <string>
#include <vector>
-#include "Metrics.h"
#include "SharedPtr.h"
#include "SharedPtr.h"
+#include "MultiTracker.h"
+#include "Detector.h"
namespace suanzi {
namespace suanzi {
+ TK_DECLARE_PTR(Tracker);
+ TK_DECLARE_PTR(Patch);
typedef enum
{
Fire = -1,
typedef enum
{
Fire = -1,
@@
-17,37
+20,27
@@
namespace suanzi {
Delete
} TrackerStatus;
Delete
} TrackerStatus;
- TK_DECLARE_PTR(Tracker);
-// TK_DECLARE_PTR(KalmanFilter);
class Tracker
{
public:
class Tracker
{
public:
- Tracker(
int id
);
+ Tracker(
const cv::Mat& image, const Detection& d, int id = 0
);
virtual ~Tracker();
void updateState(const cv::Mat& image);
virtual ~Tracker();
void updateState(const cv::Mat& image);
- void addPatch(Patch* p);
- TrackerStatus status;
+ void addPatch(PatchPtr p);
+ 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:
private:
- TrackerStatus preStatus;
+ TrackerStatus preStatus
= TrackerStatus::Fire
;
int id;
int id;
- int age;
- int last_active;
- std::vector<Patch *> patches;
- cv::KalmanFilter kf = {4,2};
+ int age = 1;
+ int last_active = 1;
+ cv::KalmanFilter KF = {4,2};
};
};
-
-// class KalmanFilter
-// {
-// public:
-// KalmanFilter();
-// ~KalmanFilter();
-// private:
-// cv::KalmanFilter
-//
-// };
-
-
}
#endif /* _TRACKER_H_ */
}
#endif /* _TRACKER_H_ */