title: OpenCV video stabilization
body: <p>I'm trying to implement video stabilization using OpenCV videostab module. I need to do it in stream, so I'm trying to get motion between two frames. After learning documentation, I decide to do it this way:</p>
  
  <pre><code>estimator = new cv::videostab::MotionEstimatorRansacL2(cv::videostab::MM_TRANSLATION);
  keypointEstimator = new cv::videostab::KeypointBasedMotionEstimator(estimator);
  
  bool res;
  auto motion = keypointEstimator-&gt;estimate(this-&gt;firstFrame, thisFrame, &amp;res);
  std::vector&lt;float&gt; matrix(motion.data, motion.data + (motion.rows*motion.cols));
  </code></pre>
  
  <p>Where <code>firstFrame</code> and <code>thisFrame</code> are fully initialized frames. The problem is, that <code>estimate</code> method always return the matrix like that:</p>
  
  <p><img src="https://i.imgur.com/fxkez1I.png" alt="a busy cat"></p>
  
  <p>In this matrix only last value(<code>matrix[8]</code>) is changing from frame to frame. Am I correctly use videostab objects and how can I apply this matrix on frame to get result?</p>