using namespace suanzi;
using namespace cv;
+using namespace std;
static const int MaxLost = 5;
status = TrackerStatus::Fire;
preStatus = TrackerStatus::Fire;
- // TODO
- // init KalmanFilter
+ // TODO: Kalman filter
this->kf.transitionMatrix = (Mat_<float>(4, 4) <<
1, 0, 1, 0,
0, 1, 0, 1,
Tracker::~Tracker()
{
+ patches.clear();
}
-//void Tracker::addPatch(Patch* p)
-//{
-// patches.push_back(p);
-// if (patches.size() > Metrics::MaxPatch){
-// patches.erase(patches.end());
-// }
-//}
-//
void Tracker::updateState(const Mat& image)
{
preStatus = this->status;
status = TrackerStatus::Lost;
}
}
+
+void Tracker::addPatch(PatchPtr p)
+{
+ this->patches.push_back(p);
+}