title: How to allocate the elements of a matrix in c++ opencv?
body: <p>I have always used the C API and am trying to convert a simple project to the C++ API to get a handle on it, but I can't seem to figure out how to allocate the elements of a matrix in C++.  For example, I have the following array:</p>
  
  <pre><code>double rotation[] = { 0, 1, 0,
                       -1, 0, 0,
                        0, 0, 1 };
  </code></pre>
  
  <p>I have a 3x3 Mat, allocated with <code>Mat *rotation_vector = new Mat(3,3, CV_64FC1);</code></p>
  
  <p>In C, it would simply be <code>cvInitMatHeader(rotation_vector, 3, 3, CV_64FC1, rotation);</code>.  How is this done in C++?</p>