title: How to deep copy from cv::Mat to IplImage?
body: <p>In a function like this</p>
  
  <pre><code>void ipl_in_ipl_out(IplImage* src, IplImage* dst) {
      cv::Mat src_mat(src);
      dst = cvCloneImage(&amp;(IplImage) src_mat);
  }
  </code></pre>
  
  <p>when out the function, there is no data in dst. And how to deep copy from  cv::Mat to IplImage? I want to use cv::Mat to process, but in and out of a function should be IplImage*.</p>
  
  <p>I've also tried to make src_mat as a Class member, but failed. And tried methods in <a href="https://stackoverflow.com/questions/4664187/converting-cvmat-to-iplimage">Converting cv::Mat to IplImage*</a>. </p>
  
  <p>So how to deal with this problem? Thanks!</p>