matrix - initializing transitionMatrix in kalman filter -


i working on object tracking project , want improve results getting using kalman filter.

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 

in last line,we have error "windows has triggered breakpoint in project(kalman).exe.

this may due corruption of heap, indicates bug in project(kalman).exe or of dlls has loaded.

this may due user pressing f12 while project(kalman).exe has focus." please me :(

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


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -