title: OpenCV Mat to IplImage* conversion
body: <p>I have a pointer to image:</p>
  
  <pre><code>IplImage *img;
  </code></pre>
  
  <p>which has been converted to <code>Mat</code></p>
  
  <pre><code>Mat mt(img);
  </code></pre>
  
  <p>Then, the <code>Mat</code> is sent to a function that gets a reference to <code>Mat</code> as input <code>void f(Mat &amp;m);</code></p>
  
  <pre><code>f(mt);
  </code></pre>
  
  <p>Now I want to copy back the <code>Mat</code> data to the original image.</p>
  
  <p>Do you have any suggestion?</p>
  
  <p>Best
  Ali</p>