编译期间遇到以下错误。为什么指针引用不起作用?
error: no match for ‘operator*’ (operand type is ‘cv::MatCommaInit
ializer_<float>’)
KF.transitionMatrix = *(Mat_<float>(6, 6) <<
代码段:
void Tracking::kalman_xyz_init()
{
const int stateNum = 6;
const int measureNum = 3;
KF = KalmanFilter(stateNum, measureNum, 0);
state = cv::Mat(stateNum, 1, CV_32FC1); //state(x,y,z, detaX,detaY,detaZ)
measurement = Mat::zeros(measureNum, 1, CV_32F);
prediction = Mat::zeros(measureNum, 1, CV_32F);
randn( state, Scalar::all(0), Scalar::all(0.1) );
KF.transitionMatrix = *(Mat_<float>(6, 6) <<
1,0,0,1,0,0,
0,1,0,0,1,0,
0,0,1,0,0,1,
0,0,0,1,0,0,
0,0,0,0,1,0,
0,0,0,0,0,1 );
}