title: Opencv Unhandled exception in contour.exe
body: <p>My code in <em>OpenCV</em> works well up until when I want to find <em>contours</em>:</p>
  
  <pre><code>findContours(src, contours,hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE);
  </code></pre>
  
  <p>then I keep getting the following error:</p>
  
  <blockquote>
    <p>"Unhandled exception at 0x773e3e28 in Contour.exe: Microsoft C++
    exception: cv::Exception at memory location 0x002ff3ac.."</p>
  </blockquote>
  
  <p>Do you have any idea about this error?</p>
  
  <p>My full code is below.</p>
  
  <p>Thanks</p>
  
  <pre><code>Mat src=Mat(100,200,CV_64F),newimg;
  vector&lt;vector&lt;Point&gt;&gt; contours;
  vector&lt;Vec4i&gt; hierarchy;
  
  for (int i=25;i&lt;80;i++)
      for(int j=25;j&lt;80;j++)
          src.at&lt;double&gt;(i,j)=1;
  imshow("img",src);
  waitKey(0);
  
  findContours(src, contours,hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE);
  </code></pre>