+ patches.clear();
+}
+
+void Tracker::updateState(const Mat& image)
+{
+ preStatus = this->status;
+ int lost_age = this->age - this->last_active;
+ int active_age = this->last_active;
+
+ if (lost_age >= MaxLost){
+ status = TrackerStatus::Delete;
+ } else if (lost_age >= 1 && active_age == 1){
+ status = TrackerStatus::Delete;
+ } else if (lost_age >= 1) {
+ status = TrackerStatus::Lost;
+ }
+}
+
+void Tracker::addPatch(PatchPtr p)
+{
+ patches.insert(patches.begin(), p);
+ if (patches.size() > MaxPatch){
+ patches.erase(patches.end());
+ }
+}
+
+void Tracker::correct(const cv::Mat& image, const Detection& detection)
+{
+ // detection.center_x, detection.center_y,
+ // KF.correct(detect.center_x, detect.center_y);
+ preStatus = status;
+ status = TrackerStatus::Active;
+ last_active = age;
+}
+
+void Tracker::predict()
+{
+ age++;
+ //detection = KF.predict();