title: findChessboardCorners fails for calibration image
body: <p>I am trying to get OpenCV 2.4.5 to recognize a checkerboard pattern from my webcam. I couldn't get that working, so I decided to try to get it working just using a "perfect" image:</p>
  
  <p><img src="https://i.stack.imgur.com/2Bfo4.png" alt="checkerboard with white border"></p>
  
  <p>but it still won't work--patternFound returns false every time. Does anyone have any idea what I'm doing wrong?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  #include &lt;opencv2/core/core.hpp&gt;
  #include &lt;opencv2/imgproc/imgproc.hpp&gt;
  #include &lt;opencv2/calib3d/calib3d.hpp&gt;
  #include &lt;opencv2/highgui/highgui.hpp&gt;
  
  using namespace cv;
  using namespace std;
  
  int main(){
      Size patternsize(8,8); //number of centers
      Mat frame = imread("perfect.png"); //source image
      vector&lt;Point2f&gt; centers; //this will be filled by the detected centers
  
      bool patternfound = findChessboardCorners(frame,patternsize,centers);
  
      cout&lt;&lt;patternfound&lt;&lt;endl;
      drawChessboardCorners(frame, patternsize, Mat(centers), patternfound);
  
      cvNamedWindow("window");
      while(1){
          imshow("window",frame);
          cvWaitKey(33);
      }
  }
  </code></pre>