title: OpenCV Error: Assertion failed, mat.cpp line 537
body: <p><a href="http://pastebin.com/5ZeMvm2C" rel="nofollow">http://pastebin.com/5ZeMvm2C</a> is my header file in my project.</p>
  
  <p>There are skeleton.at(yaxis,xaxis+1) at line 249. When i type this code in my project i got this error:</p>
  
  <pre><code>**OpenCV Error: Assertion failed (dims &lt;= 2 &amp;&amp; data &amp;&amp; (unsigned)i0 &lt; (unsigned)si
  ze.p[0] &amp;&amp; (unsigned)(i1*DataType&lt;_Tp&gt;::channels) &lt; (unsigned)(size.p[1]*channel
  s()) &amp;&amp; ((((sizeof(size_t)&lt;&lt;28)|0x8442211) &gt;&gt; ((DataType&lt;_Tp&gt;::depth) &amp; ((1 &lt;&lt; 3
  ) - 1))*4) &amp; 15) == elemSize1()) in unknown function, file c:\opencv\build\inclu
  de\opencv2\core\mat.hpp, line 537**
  
  // mat.cpp line 537 is:
      template&lt;typename _Tp&gt; inline _Tp&amp; Mat::at(int i0, int i1)
          {
              CV_DbgAssert( dims &lt;= 2 &amp;&amp; data &amp;&amp; (unsigned)i0 &lt; (unsigned)size.p[0] &amp;&amp;
                  (unsigned)(i1*DataType&lt;_Tp&gt;::channels) &lt; (unsigned)(size.p[1]*channels()) &amp;&amp;
                  CV_ELEM_SIZE1(DataType&lt;_Tp&gt;::depth) == elemSize1());
              return ((_Tp*)(data + step.p[0]*i0))[i1];
          }
  </code></pre>
  
  <p>What's wrong?</p>
  
  <p><a href="http://pastebin.com/gqJ5RpBU" rel="nofollow">http://pastebin.com/gqJ5RpBU</a> is also my .cpp file.</p>