Ask Your Question

Revision history [back]


Your pattern in the sample image is either too distorted or it was generated incorrectly (points have to be in specific locations, just visual similarity to the OpenCV pattern is not enough). According to documentation the flag CALIB_CB_CLUSTERING is suitable in such cases because you have distortion but don't have background clutter. Code becomes:

image = cv2.imread('/mypath/myimage.png')
shape = (3, 11)
[isFound, centers] = cv2.findCirclesGrid(image, shape, flags = cv2.CALIB_CB_ASYMMETRIC_GRID + cv2.CALIB_CB_CLUSTERING)

This code works for me and your sample image: isFound is True and detected centers have correct locations.