title: How do I convert Mat to IplImage in C NOT C++
body: <p>I'm using some old C code that uses the old deprecated <code>IplImage</code> type.</p>
  
  <p>I'm using the new OpenCV 2.3.1 for Android, and the images I get from the camera are <code>CvMat</code>s.  I want to convert them to <code>IplImage</code> so I can pass it to the native function.</p>
  
  <p>Alternatively, I could modify the original function to accept a <code>CvMat</code> and convert it to <code>IplImage</code> inside the body of the function, but I need to do this in C NOT C++.</p>