title: How to interpret c++ opencv Assertion error messages due to an error in cvtColor function?
body: <p>Following is an Assertion Error report (displayed on console) when calling cvtColor() function in opencv giving the argument CV_GRAY2BGR  on a Mat object which is already a BGR image. I want to know how to interpret this error message by a person who yet doesn't know what the error here. (Hope some erudites won't vote to close this question as off topic, as I know there is a big value in learning to read Assertion or any other error messages for newbees for c++. ) And as I guess this might be most probably a opencv issue on reading assertion errors.</p>
  
  <pre><code>OpenCV Error: Assertion failed (scn == 1 &amp;&amp; (dcn == 3 ||
   dcn == 4)) in cv::cvtColor, file C:\builds\2_4_PackSlave-win32-vc12-shared\open
  cv\modules\imgproc\src\color.cpp, line 3791
  </code></pre>
  
  <p>I know 2 conditions are tested here,</p>
  
  <ol>
  <li>(scn == 1)     </li>
  <li>(dcn == 3 || dcn == 4)</li>
  </ol>
  
  <p>and one of them should have failed which has caused the Assertion error. How to distinct and clarify the failed condition? May be I might have to seek into the cvtColor function source code and that would be no problem. (actually I did it but I couldn't find variables with names scn or dcn there in that improc.cpp class there)</p>