2014-09-10 2 views
0

Je travaille sur un projet de suivi d'objet et je souhaite améliorer les résultats obtenus avec un filtre de Kalman.initialisation transitionMatrix dans le filtre kalman

KalmanFilter KF(4 , 2 , 2 ,CV_32F); 
Mat_<float> state(4, 1); 
Mat_<float> processNoise(4, 1, CV_32F); 
Mat_<float> measurement(2 , 1 , CV_32F); 
measurement.setTo(Scalar(0)); 

KF.statePre.at<float>(0) = 0; 
KF.statePre.at<float>(1) = 0; 
KF.statePre.at<float>(2) = 0; 
KF.statePre.at<float>(3) = 0; 

KF.transitionMatrix = *(Mat_<float>(4, 4) << 1,0,1,0, 0,1,0,1, 0,0,1,0, 0,0,0,1); //Including velocity 

en dernière ligne, nous avons erreur « Windows a déclenché un point d'arrêt dans le projet (Kalman) .exe.

Cela peut être dû à une corruption du tas, ce qui indique un bogue dans le projet (Kalman) .exe ou l'une des DLL qu'il a chargé

Cela peut également être dû à l'utilisateur appuyant sur F12 alors que Project (Kalman) .exe a le focus. " s'il vous plaît aidez-moi :(

Répondre

0

transition float const [2] [2] = {1, 1, 0, 1}; memcpy (KF.transitionMatrix.data, transition, sizeof (transition));

Questions connexes