Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

findCirclesGrid in Python

I am having some difficulty finding out how to get findCirclesGrid() in the cv2 module working in Python. Here's what I'm using for parameters:

image: an image in the form of a numpy ndarray. patternSize: tuple containing my width and height of the pattern; my case is (4,11) flags: cv2.CALIB_CB_ASYMMETRIC_GRID since my grid is asymmetric

The function executes without an error. The first return value is always False, which seems to indicate that the pattern could not be detected. The second return value, centers, is an numpy ndarray. It looks like this typically:

[[[ 150.26068115 149.73667908]] [[179.99241638 150.15336609]] [[ 210.01210022 149.9016571 ]] [[ 240.06182861 149.86331177]] [[ 149.89584351 180.01303101]] [[ 179.57373047 180.05331421]] [[ 210.33233643 180.1463623 ]] [[ 239.53469849 180.49691772]] [[ 150.08843994 210.23040771]] [[ 180.15136719 209.93945312]] [[ 209.52470398 209.71012878]] [[ 240.57177734 209.7552948 ]]]

Although the first return value is False, I still try to display to the centers using drawChessboardCorners(image,patternSize,True). Then I display the results using cv.ShowImage(), where I first convert the image from an ndarray to an image using cv.fromarray(). The centers are certainly in the wrong locations.

I am not sure if the problem is due to my images or due to my code. Any advice would be greatly appreciated. Thanks!

JL

findCirclesGrid in Python

I am having some difficulty finding out how to get findCirclesGrid() in the cv2 module working in Python. Here's what I'm using for parameters:

image: an image in the form of a numpy ndarray. patternSize: tuple containing my width and height of the pattern; my case is (4,11) flags: cv2.CALIB_CB_ASYMMETRIC_GRID since my grid is asymmetric

The function executes without an error. The first return value is always False, which seems to indicate that the pattern could not be detected. The second return value, centers, is an numpy ndarray. It looks like this typically:

[[[ 150.26068115 149.73667908]] [[179.99241638 150.15336609]] [[ 210.01210022 149.9016571 ]] [[ 240.06182861 149.86331177]] [[ 149.89584351 180.01303101]] [[ 179.57373047 180.05331421]] [[ 210.33233643 180.1463623 ]] [[ 239.53469849 180.49691772]] [[ 150.08843994 210.23040771]] [[ 180.15136719 209.93945312]] [[ 209.52470398 209.71012878]] [[ 240.57177734 209.7552948 ]]]

Although the first return value is False, I still try to display to the centers using drawChessboardCorners(image,patternSize,True). Then I display the results using cv.ShowImage(), where I first convert the image from an ndarray to an image using cv.fromarray(). The centers are certainly in the wrong locations.

I am not sure if the problem is due to my images or due to my code. Any advice would be greatly appreciated. Thanks!

JL

Sample image: image description

findCirclesGrid in Python

I am having some difficulty finding out how to get findCirclesGrid() in the cv2 module working in Python. Here's what I'm using for parameters:

image: an image in the form of a numpy ndarray. patternSize: tuple containing my width and height of the pattern; my case is (4,11) flags: cv2.CALIB_CB_ASYMMETRIC_GRID since my grid is asymmetric

The function executes without an error. The first return value is always False, which seems to indicate that the pattern could not be detected. The second return value, centers, is an numpy ndarray. It looks like this typically:

[[[ 150.26068115 149.73667908]] [[179.99241638 150.15336609]] [[ 210.01210022 149.9016571 ]] [[ 240.06182861 149.86331177]] [[ 149.89584351 180.01303101]] [[ 179.57373047 180.05331421]] [[ 210.33233643 180.1463623 ]] [[ 239.53469849 180.49691772]] [[ 150.08843994 210.23040771]] [[ 180.15136719 209.93945312]] [[ 209.52470398 209.71012878]] [[ 240.57177734 209.7552948 ]]]

Although the first return value is False, I still try to display to the centers using drawChessboardCorners(image,patternSize,True). Then I display the results using cv.ShowImage(), where I first convert the image from an ndarray to an image using cv.fromarray(). The centers are certainly in the wrong locations.

I have tried using a sample image. Even the results from this are not working. The code I am using looks like this:

img = scipy.misc.imread('/mypath/myimage.png')    
cv2.findCirclesGrid(img, (4,11), flags=cv2.CALIB_CB_ASYMMETRIC_GRID)

I am not sure if the problem is due to my images or due to my code. Any advice would be greatly appreciated. Thanks!

JL

Sample image: image description

findCirclesGrid in Python

I am having some difficulty finding out how to get findCirclesGrid() in the cv2 module working in Python. Here's what I'm using for parameters:

image: an image in the form of a numpy ndarray. patternSize: tuple containing my width and height of the pattern; my case is (4,11) flags: cv2.CALIB_CB_ASYMMETRIC_GRID since my grid is asymmetric

The function executes without an error. The first return value is always False, which seems to indicate that the pattern could not be detected. The second return value, centers, is an numpy ndarray. It looks like this typically:

[[[ 150.26068115 149.73667908]] [[179.99241638 150.15336609]] [[ 210.01210022 149.9016571 ]] [[ 240.06182861 149.86331177]] [[ 149.89584351 180.01303101]] [[ 179.57373047 180.05331421]] [[ 210.33233643 180.1463623 ]] [[ 239.53469849 180.49691772]] [[ 150.08843994 210.23040771]] [[ 180.15136719 209.93945312]] [[ 209.52470398 209.71012878]] [[ 240.57177734 209.7552948 ]]]

Although the first return value is False, I still try to display to the centers using drawChessboardCorners(image,patternSize,True). Then I display the results using cv.ShowImage(), where I first convert the image from an ndarray to an image using cv.fromarray(). The centers are certainly in the wrong locations.

I have tried using a sample image. Even the results from this are not working. The code I am using looks like this:

img = scipy.misc.imread('/mypath/myimage.png')    
cv2.findCirclesGrid(img, (4,11), (3,11), flags=cv2.CALIB_CB_ASYMMETRIC_GRID)

I am not sure if the problem is due to my images or due to my code. Any advice would be greatly appreciated. Thanks!

JL

Sample image: image description

findCirclesGrid in Python

I am having some difficulty finding out how to get findCirclesGrid() in the cv2 module working in Python. Here's what I'm using for parameters:

image: an image in the form of a numpy ndarray. patternSize: tuple containing my width and height of the pattern; my case is (4,11) flags: cv2.CALIB_CB_ASYMMETRIC_GRID since my grid is asymmetric

The function executes without an error. The first return value is always False, which seems to indicate that the pattern could not be detected. The second return value, centers, is an numpy ndarray. It looks like this typically:

[[[ 150.26068115 149.73667908]] [[179.99241638 150.15336609]] [[ 210.01210022 149.9016571 ]] [[ 240.06182861 149.86331177]] [[ 149.89584351 180.01303101]] [[ 179.57373047 180.05331421]] [[ 210.33233643 180.1463623 ]] [[ 239.53469849 180.49691772]] [[ 150.08843994 210.23040771]] [[ 180.15136719 209.93945312]] [[ 209.52470398 209.71012878]] [[ 240.57177734 209.7552948 ]]]

Although the first return value is False, I still try to display to the centers using drawChessboardCorners(image,patternSize,True). Then I display the results using cv.ShowImage(), where I first convert the image from an ndarray to an image using cv.fromarray(). The centers are certainly in the wrong locations.

I have tried using a sample image. Even the results from this are not working. The code I am using looks like this:

img = scipy.misc.imread('/mypath/myimage.png')    
cv2.findCirclesGrid(img, (3,11), flags=cv2.CALIB_CB_ASYMMETRIC_GRID)

I am not sure if the problem is due to my images or due to my code. Any advice would be greatly appreciated. Thanks!

JL

Sample image: image description

findCirclesGrid in Python

I am having some difficulty finding out how to get findCirclesGrid() in the cv2 module working in Python. Here's what I'm using for parameters:

image: an image in the form of a numpy ndarray. patternSize: tuple containing my width and height of the pattern; my case is (4,11) flags: cv2.CALIB_CB_ASYMMETRIC_GRID since my grid is asymmetric

The function executes without an error. The first return value is always False, which seems to indicate that the pattern could not be detected. The second return value, centers, is an numpy ndarray. It looks like this typically:

[[[ 150.26068115 149.73667908]] [[179.99241638 150.15336609]] [[ 210.01210022 149.9016571 ]] [[ 240.06182861 149.86331177]] [[ 149.89584351 180.01303101]] [[ 179.57373047 180.05331421]] [[ 210.33233643 180.1463623 ]] [[ 239.53469849 180.49691772]] [[ 150.08843994 210.23040771]] [[ 180.15136719 209.93945312]] [[ 209.52470398 209.71012878]] [[ 240.57177734 209.7552948 ]]]

Although the first return value is False, I still try to display to the centers using drawChessboardCorners(image,patternSize,True). Then I display the results using cv.ShowImage(), where I first convert the image from an ndarray to an image using cv.fromarray(). The centers are certainly in the wrong locations.

I have tried using a sample image. Even the results from this are not working. The code I am using looks like this:

img = scipy.misc.imread('/mypath/myimage.png')    
cv2.findCirclesGrid(img, (3,11), flags=cv2.CALIB_CB_ASYMMETRIC_GRID)

I am not sure if the problem is due to my images or due to my code. Any advice would be greatly appreciated. Thanks!

JL

Sample image: image description