title: Using findCirclesGrid() in large images
body: <p>I am using OpenCV 3 in Python 2.7 to calibrate different cameras. I use the findCirclesGrid() function, which succesfully finds a <a href="http://robocraft.ru/files/opencv/acircles_pattern.png" rel="nofollow">4 by 11 circle pattern</a> in a 1 Megapixel image. However, when I try to detect the pattern up close in an image with a higher resolution, the function fails. When the object is farther away in the image, it is still detected. I use the function as follows:</p>
  
  <pre><code>ret, corners = cv2.findCirclesGrid(image, (4, 11), flags=cv2.CALIB_CB_ASYMMETRIC_GRID)
  </code></pre>
  
  <p>With larger images, it returns <code>False, None</code>. It seems that the function can't handle circles that have a too large area. I tried adding <code>cv2.CALIB_CB_CLUSTERING</code>, but this doesn't seem to make a difference. Also, it seems that in C++ the user can signify the use of blobdetector, but not in  Python. Details: <a href="http://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#findcirclesgrid" rel="nofollow">http://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#findcirclesgrid</a></p>
  
  <p>Can I increase the maximum detection size somehow or make the function detect the pattern in another way?</p>
  
  <p>Edit: I found out how to edit parameters of the blobDetector by using</p>
  
  <pre><code>params = cv2.SimpleBlobDetector_Params()
  params.maxArea = 100000
  detector = cv2.SimpleBlobDetector_create(params)
  ret, corners = cv2.findCirclesGrid(self.gray, (horsq, versq), None,
                  flags=cv2.CALIB_CB_ASYMMETRIC_GRID, blobDetector=detector)
  </code></pre>
  
  <p>Still the same issue, though.</p>
  
  <p>Edit2:
  Now adding <code>cv2.CALIB_CB_CLUSTERING</code> resolves the issue!</p>