rules for generating calibration pattern [closed]

asked 2013-09-07 03:54:30 -0600

efanucar gravatar image

updated 2013-09-08 05:11:06 -0600

Hi all!

We need a calibration pattern with outer dimensions of around 600 mm x 600 mm.

I tried to use the python script which can be found in the doc folder of the OpenCV distribution but it does not generate an svg of this size. It stops without an error message and does not write an svg file.

So I want to create the pattern on my own and want to understand the "rules" (and I want to understand them not only because the python script is not working for my size):

  • is it better to use a different count of rows and columns?
  • how many circles do I need for a good calibration pattern?
  • which radius should I use in relation to the outer dimensions?
  • which spacing is needed between the circles?
  • which spacing is needed between the outer circles and the border of the whole pattern?

Because I can not print a pattern of this size and have to pay for the printing, I need to know the rules and can not try many different things.

Here is a sample pattern generated by the python script (I guess you could resize it to the required final size), I only added a bounding rect manually. The command line:

./gen_pattern.py -c 6 -r 7 -o out.svg -T circles -u mm -s 50

So I use a square size of 50 and the script automatically sets the radius of the circles to 1/5 of this size => 10. This is hard-coded and there is a comment in the script: "#radius is a 5th of the spacing TODO parameterize"

Obviously this is adjustable. So, this is one of my questions: which is the perfect balance between spacing and radius?

circle pattern generated by python script

Thanks!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-10-13 02:08:32.269641

Comments

1
  • "is it better to use a different count of rows and columns?" - yes. the 'quadratic' pattern has problems with rotation, prefer rectangular ones.

  • i have no idea about the inner spacing, but you need a clear border of (at least) the same around your pattern

  • if you could add the error message you get ? maybe someone even has an idea about that.

berak gravatar imageberak ( 2013-09-07 04:10:16 -0600 )edit

"It stops without an error message"

efanucar gravatar imageefanucar ( 2013-09-07 04:23:14 -0600 )edit

sorry, sloppy reader here. still, your cmdline params might be helpful for anyone trying to reproduce it.

berak gravatar imageberak ( 2013-09-07 04:46:21 -0600 )edit
1

you're right, I updated the question - but my main intention is to understand the rules not to solve the error of the python script

efanucar gravatar imageefanucar ( 2013-09-07 05:33:33 -0600 )edit

Hello, where do I find the Python Script?

Phys1k3r gravatar imagePhys1k3r ( 2013-10-01 07:01:33 -0600 )edit

on your disk: opencv/doc/pattern_tools

or here

berak gravatar imageberak ( 2013-10-01 07:20:23 -0600 )edit

Thank you!

I never used Python before and I am not able to compile the script.

I installed Python 3.3 and I always get some syntax errors, when I try to use the command line you used

Phys1k3r gravatar imagePhys1k3r ( 2013-10-01 08:29:02 -0600 )edit

hmm, it definitely works with python 2.7

berak gravatar imageberak ( 2013-10-01 08:46:06 -0600 )edit