title: Opencv create new image using cv::Mat
body: <p>I'm new to opencv and i'm trying on some sample codes.</p>
  
  <p>in one code, <code>Mat gr(row1,col1,CV_8UC1,scalar(0));
  int x =     gr.at&lt;uchar&gt; (row,col);</code></p>
  
  <p>And in another one, </p>
  
  <pre><code>Mat grHistrogram(301,260,CV_8UC1,Scalar(0,0,0));
  line(grHistrogram,pt1,pt2,Scalar(255,255,255),1,8,0);
  </code></pre>
  
  <p>Now my question is if i used scalar(0) instead of scalar(0,0,0) in second code, The code doesn't work. 
   1.Why this happening since, Both create a Mat image structure.
   2.what is the purpose of const cv:Scalar &amp;_s.</p>
  
  <p>I search the Documentaion from Opencv site (opencv.pdf,opencv2refman.pdf) and Oreilly's Opencv book. But couldn't find a explained answer.</p>
  
  <p>I think i'm using the Mat(int _rows,int _cols,int _type,const cv:Scalar &amp;_s) struct.</p>