title: initializing transitionMatrix in kalman filter
body: <p>I am working on a object tracking project and I want to improve the results I am getting using a Kalman filter.</p>
  
  <pre><code>KalmanFilter KF(4 , 2 , 2 ,CV_32F );
  Mat_&lt;float&gt; state(4, 1);
  Mat_&lt;float&gt; processNoise(4, 1, CV_32F);
  Mat_&lt;float&gt; measurement(2 , 1 , CV_32F); 
  measurement.setTo(Scalar(0));
  
  KF.statePre.at&lt;float&gt;(0) = 0;
  KF.statePre.at&lt;float&gt;(1) = 0;
  KF.statePre.at&lt;float&gt;(2) = 0;
  KF.statePre.at&lt;float&gt;(3) = 0;
  
  KF.transitionMatrix = *(Mat_&lt;float&gt;(4, 4) &lt;&lt; 1,0,1,0,   0,1,0,1,  0,0,1,0,  0,0,0,1); //Including velocity
  </code></pre>
  
  <p>in last line,we have error "Windows has triggered a breakpoint in Project(Kalman).exe.</p>
  
  <p>This may be due to a corruption of the heap, which indicates a bug in Project(Kalman).exe or any of the DLLs it has loaded.</p>
  
  <p>This may also be due to the user pressing F12 while Project(Kalman).exe has focus."
  please help me :(</p>