+ // TODO: Kalman filter
+ this->kf.transitionMatrix = (Mat_<double>(4, 4) <<
+ 1, 0, 1, 0,
+ 0, 1, 0, 1,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1);
+
+ this->kf.measurementMatrix = (Mat_<double>(2, 2) <<
+ 1, 0, 0, 0,
+ 0, 1, 0, 0);
+
+ this->kf.processNoiseCov = 1e-5 * Mat_<double>::eye(4, 4);
+ this->kf.measurementNoiseCov = 1e-1 * Mat_<double>::ones(2, 2);
+ this->kf.errorCovPost = 1. * Mat_<double>::ones(4, 4);
+ //this->kf.statePre = 0.1 * Matx_<int, 4, 1>::randn(4, 1);
+ //??? TODO
+ randn(this->kf.statePre, Scalar::all(0), Scalar::all(0.1));
+ this->kf.statePost = (Mat_<double>(4, 1) << detection.center_x, detection.center_y, 0, 0);