title: Error using calcCovarMatrix in openCv
body: <p>I am trying to calculate the covariance matrix in my code but I am getting an error doing that. I have the array of mean values which I want to use. Here is my code</p>
  
  <pre><code>Mat Zt(Z);
  Mat Zttranspose;
  Mat covarZ=cvCreateMat(image-&gt;nChannels,image-&gt;nChannels,CV_32FC1);
  
  Zttranspose=Zt.t();
  
  Mat_&lt;float&gt; arraymean=(Mat_&lt;float&gt;(3,3)&lt;&lt; meanb, meang, meanr);
  
  calcCovarMatrix(Zt,covarZ,arraymean,CV_COVAR_USE_AVG,CV_64F)
  </code></pre>
  
  <p>But I get the following error:</p>
  
  <pre><code>OpenCV Error: Assertion failed (((flags &amp; CV_COVAR_ROWS) != 0) ^ ((flags &amp; CV_COVAR_COLS) != 0)) in calcCovarMatrix, file /usr/local/src/OpenCV-2.3.0/modules/core/src/matmul.cpp, line 2127 terminate called after throwing an instance of 'cv::Exception'
  </code></pre>