Ask Your Question
0

Calibration with findCirclesGrid - trouble with pattern width/height

asked 2016-06-15 12:57:05 -0600

gandalfsaxe gravatar image

updated 2016-06-18 05:33:31 -0600

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): image description

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: image description

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

Wide image, width=5, height=14: image description

Clearly wrong.

Tall image, width=7, height=10: image description

This is actually correct.

Tall image, width=5, height=14: image description

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 flag offensive close merge delete

Comments

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

Tetragramm gravatar imageTetragramm ( 2016-06-15 17:47:57 -0600 )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?

gandalfsaxe gravatar imagegandalfsaxe ( 2016-06-17 09:02:26 -0600 )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.

Tetragramm gravatar imageTetragramm ( 2016-06-17 16:00:59 -0600 )edit

Alright, thanks.

gandalfsaxe gravatar imagegandalfsaxe ( 2016-06-18 03:50:53 -0600 )edit

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

CircledCubicle gravatar imageCircledCubicle ( 2016-10-03 04:20:16 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
5

answered 2016-10-03 10:52:36 -0600

CircledCubicle gravatar image

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 :)

rows 11 columns 4 opencv asymmetric circle grid

edit flag offensive delete link more

Comments

1

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

StevenPuttemans gravatar imageStevenPuttemans ( 2016-10-04 04:54:06 -0600 )edit
1

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

AJW gravatar imageAJW ( 2016-10-06 04:29:08 -0600 )edit

Feel free to update documentation accordingly!

StevenPuttemans gravatar imageStevenPuttemans ( 2016-10-06 04:56:11 -0600 )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?

svenevs gravatar imagesvenevs ( 2018-02-01 12:38:10 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-06-15 12:57:05 -0600

Seen: 9,428 times

Last updated: Oct 03 '16