Monday, June 4, 2012

Create a camera calibration chess board pattern PDF file

For calibrating a camera to calculate its intrinsic parameters e.g. focal length, principal point and distortion, some camera calibration toolboxes make use of images of chessboard patterns taken with the camera. One such toolbox is this open-source software from this site http://graphics.cs.msu.ru/en. To create this calibration chess board pattern, there are a variety of methods that can be employed to generate it.


In this post, I shall use the free and open-source vector illustration software Inkscape to create an A4 sized 8x3cm by 6x3cm tiles calibration pattern. Inkscape can be downloaded from this site http://inkscape.org.

  1. Start Inkscape.

  2. Select File | Document Properties.

    The Document Properties dialog box appears.
  3. In the Page Size list box, select A4. In the Default Units field, choose cm. Close the Document Properties dialog box.
  4. In the toolbox, click the Create rectangles and squares icon.
  5. Click and drag out a rectangle on the page.

  6. In the Change W and H fields, type in 3.
  7. In the toolbox, click the Select and transform objects icon.

  8. Select Edit | Copy.
  9. Select Edit | Paste. Repeat to paste the square two more times.

  10. Change the fill color of two squares to black. Change the fill color of two squares to white.

  11. Click the Select and transform objects icon and select all squares.
  12. Select Object | Rows and Columns.

    The Rows and Columns pane appears.
  13. Ensure the Rows and Columns are set to 2. Ensure the Set spacing is 0. Click Arrange.

    The squares are rearranged.
  14. Ensure all the squares are selected. Select Object | Group.

    All the squares are grouped as a single object.
  15. Select Edit | Copy.
  16. Select Edit | Paste. Repeat 10 more times to place a total of 48 (3x4x4) tiles.
  17. Press CTRL-A.

    All the tiles are selected.
  18. Select Object | Rows and Columns if the Rows and Columns pane is not displayed.

    The Rows and Columns pane is displayed.
  19. In the Rows field, type in 4. In the Columns field, type in 3. Click Arrange.

    The calibration chess board pattern is complete.
  20. Select File | Save As.

    The Select file to save to dialog box appears.
  21. In the Save as type field, choose Portable Document Format (*.pdf). Browse and type in a file name e.g. calib.pdf. Click Save.

    The file is saved.

4 comments:

niumi said...

Thank you!
This was helpful :)

Joep said...

watch out this tutorial gives symmetric chessboard patterns. For calibration you need assymetric boards.

Unknown said...

hi is there any method or steps for circles grid pattern
thanks

dominoc925 said...

Hi Saleh
Yeah it is a simple matter to create circles but is this a common pattern for calibration? I haven't seen any.
rg