title: OpenCV assertion failed in LocateROI
body: <p>I'm having a problem with an OpenCV program which compiles correctly but when it runs it aborts giving this error:</p>
  
  <pre><code>    OpenCV Error: Assertion failed (dims &lt;= 2 &amp;&amp; step[0] &gt; 0) in locateROI, file /home/user/Desktop/HOME/src/OpenCV/modules/core/src/matrix.cpp, line 647
  terminate called after throwing an instance of 'cv::Exception'
    what():  /home/user/Desktop/HOME/src/OpenCV/modules/core/src/matrix.cpp:647: error: (-215) dims &lt;= 2 &amp;&amp; step[0] &gt; 0 in function locateROI
  
  Aborted
  </code></pre>
  
  <p>I'm using ubuntu with the latest OpenCV libraries but it gives me the same error also on Leopard with Eclipse.</p>
  
  <p>The matrix.cpp file is inside my OpenCV source folder.</p>
  
  <p>I'm not able to understand why I'm getting this error.</p>
  
  <p>Can you help me, please?</p>
  
  <p>Thanks a lot.</p>