title: How to get a section of a matrix in opencv
body: <p>I have this matrix in openCV:</p>
  
  <pre><code>  cv::Matx44d m;
  </code></pre>
  
  <p>and I want to get the top left 3x3 matrix out of this matrix. What is the simplest and fastest way to do this?</p>
  
  <p>I can do it in the following ways:</p>
  
  <pre><code>cv::Matx44d m;
  cv::Matx33d o;
  for(int i=0;i&lt;3;i++)
  {
      for(int j=0;j&lt;3;j++)
      {
         o(i,j)=m(i,j);
      }
   }
  </code></pre>
  
  <p>but I am looking for a simpler and faster way if it exist!</p>