# Calibration with findCirclesGrid - trouble with pattern width/height

Hi,

I'm calibrating a GoPro Hero 4. I have calibrated using chessboard pattern. I would like to see if I can get a better calibration with the circles instead. However I'm having some problems determining the correct width/height.

Here is the pattern I'm using (generated with the included gen_pattern.py):

I'm using command: findCirclesGrid(img, (width, height), cv2.CALIB_CB_ASYMMETRIC_GRID).

I have tried all possible combinations of any way you could count the width (14 or 7) and height (5 or 10), and any combination of the two. I also tried rotating the image. It detected the pattern in the following settings:

Wide image, width=7, height=10:

Looks correct at first glance, but seeing how the dots connect, it's wrong.

Wide image, width=5, height=14:

Clearly wrong.

Tall image, width=7, height=10:

This is actually correct.

Tall image, width=5, height=14:

Again, clearly wrong.

So my questions are: 1. Why is there no correct way to detection the image in the wide orientation? 2. If I then choose the tall orientation of the image, does it only work if I had the actual image printout in the tall orientation, when posing it in front of the camera?

It seems somewhat less table to me than the chessboard, but I could be wrong?

What am I doing wrong? Thanks in advance.

edit retag close merge delete

The second from the bottom looks correct. What's wrong?

( 2016-06-15 17:47:57 -0500 )edit

Yes you're right, sorry. I knew that one of them was correct, I just forgot when I posed the question (fixed now). Actually my question is: 1. Why is there no correct way to detection the image in the wide orientation? 2. If I then choose the tall orientation of the image, does it only work if I had the actual image printout in the tall orientation, when posing it in front of the camera?

( 2016-06-17 09:02:26 -0500 )edit

Well, I don't know. THIS is how it sorts the points, so take a look and see if there's a problem. I am busy this weekend, so I won't be able to help.

( 2016-06-17 16:00:59 -0500 )edit

Alright, thanks.

( 2016-06-18 03:50:53 -0500 )edit

Hi, did you get anywhere further with this? I'm currently running into the same issue depending on camera orientation (real life images).

( 2016-10-03 04:20:16 -0500 )edit

Sort by » oldest newest most voted

Okay, so I didn't figure out why it behaves like it does, but why it occurs and how you can work around it: your pattern is identical under a 180-degree rotation, and thus confuses the detector (hint: check the corners).

Generating a pattern with the two "pointy" corners on the same side of the rectangle (i.e. not opposite of each other), and the "rounded" corners with the two circles on the same side of the rectangle (i.e. not opposite).

For example, compare your images to the one below (Generated with -r11 -c4 and rotated to fit here). Here the "pointy" corners are up, and the "rounded" corners of the pattern down. If my description of the corners is still unclear, imagine drawing the convex hull around the pattern, and you'll probably see :)

more

1

Same behaviour as the chessboard pattern, you cannot have a symmetrical pattern to ensure the algorithm knows the correct order of positions.

( 2016-10-04 04:54:06 -0500 )edit
1

That issue really needs to be documented better, I and presumably many others have been stung by it

( 2016-10-06 04:29:08 -0500 )edit

Feel free to update documentation accordingly!

( 2016-10-06 04:56:11 -0500 )edit

I am very confused by this. If I snag the image you have above, I can find the pattern. If I use what my feeble human eyes determine to be an equivalent pattern from the tutorial...I cannot find the pattern. I'm just loading the images directly and searching. Any idea what's going on here?

( 2018-02-01 12:38:10 -0500 )edit

Official site

GitHub

Wiki

Documentation