title: Mat to IplImage crash
body: <p>The camera keeps on crashing when I run my code. Trying to convert cv::mat to IplImage. </p>
  
  <pre><code>cv::Mat canvas(320, 240, CV_8UC3, Scalar(255,255,255));
  
   IplImage test =canvas;
  
    while(true )
  {  
  
   canvas =cvQueryFrame(capture);
   imgScribble = cvCreateImage(cvGetSize(&amp;test), 8, 3);
  
   IplImage* imgYellowThresh1 = GetThresholdedImage1(&amp;test);
  
  cvAdd(&amp;test,imgScribble,&amp;test);
  
  cvShowImage("video", &amp;test);
  </code></pre>