title: how to examin white quads in opencv
body: <p>I have a small chessboard and I put a geometric objects in the white squares, now I'm trying to extract  them from the image using cv::findContours(), here my code and the source and result images: </p>
  
  <pre><code>int main (){
      cv::Mat img = cv::imread("quad.jpg",0);
      cv::Mat image ;
      cv::Mat result(img.size(),CV_8U,cv::Scalar(255));
      std::vector&lt;std::vector&lt;cv::Point&gt;&gt; contours;
      //std::vector&lt;std::vector&lt;cv::Point2f&gt;&gt; hiararchy;
      cv::threshold(img,img,127,255,CV_THRESH_BINARY_INV);
      cv::findContours(img,contours,/*hiararchy,*/CV_RETR_TREE    , CV_CHAIN_APPROX_NONE );
  -1, // draw all contours
  cv::Scalar(0), // in black
  2); // with a thickness of 2
      cv::imshow("result",result);
      //cv::imwrite("con.jpg",result);
      cv::waitKey(0);
  
      return 0;
  </code></pre>
  
  <p>source</p>
  
  <p><img src="https://i.stack.imgur.com/29Fcp.jpg" alt="source"></p>
  
  <p>result </p>
  
  <p><img src="https://i.stack.imgur.com/xxECo.jpg" alt="result"></p>
  
  <p>any idea how  to tell the program : care only about the white squares </p>
  
  <p>thanks! </p>