title: cv::Mat causes crash when assigned to with 'at<unsigned char>(0,0)'
body: <p>I have the following simple bit of code that is crashing and it's not immediately clear to me why this shouldn't work.</p>
  
  <pre><code>cv::Mat *test_bug = new cv::Mat(img-&gt;rows, img-&gt;cols, CV_32F);
  test_bug-&gt;at&lt;unsigned char&gt;(0,0) = 4;
  </code></pre>
  
  <p><code>test_bug</code> ends up being a 207 by 207 matrix..so I know that the array index is valid.    This is the copy/paste error.</p>
  
  <blockquote>
    <p>OpenCV Error: Assertion failed (dims &lt;= 2 &amp;&amp; data &amp;&amp; (unsigned)i0 &lt;
    (unsigned)size.p[0] &amp;&amp; (unsigned)(i1*DataType&lt;_Tp>::channels) &lt;
    (unsigned)(size.p[1]*channels()) &amp;&amp; ((((sizeof(size_t)&lt;&lt;28)|0x8442211)</p>
    
    <blockquote>
      <blockquote>
        <p>((DataType&lt;_Tp>::depth) &amp; ((1 &lt;&lt; 3) - 1))*4) &amp; 15) == elemSize1()) in unknown function, file
        C:\opencv231\build\include\opencv2/core/mat.hpp, line 552</p>
      </blockquote>
    </blockquote>
  </blockquote>