Skip to content

Set up the calibration board

Step 1 of the walkthrough. Here you pick a board, measure it and describe it to MVIS.

  • You need: a printed board, or a monitor to show one on.
  • You get: a board: block for your config. Step 2 records with this board, and step 3 puts the block in its config.
  • Check: the tag or square size in the block matches what you measured on the board.
AprilGrid 6 × 6, tag36h11
AprilGrid 6 × 6
Chessboard 10 × 7 squares
Chessboard 10 × 7 squares
ChArUco 14 × 9 squares, DICT_5X5_250
ChArUco 14 × 9 squares

We recorded the calibration motion with the first two boards. The third is a ChArUco board (see below). You can download all three as images with configs in section 5. Each board type needs these fields:

Boardboard_typeRequired fields
AprilGridapriltagrows, cols, tag_size (m), tag_spacing (gap ÷ tag size), tag_family
Chessboardchessboardrows, cols (inner corners), square_size (m)
ChArUcocharucorows, cols (squares), square_size (m), marker_size (m), aruco_dict
  • Which to pick: an AprilGrid still gives corners when part of it is out of view. A chessboard has to be fully in view. A ChArUco board, a chessboard with a marker in each white square, gives chessboard corners and still works when part of it is out of view. Kalibr and Basalt cannot read it, so pick another board if you want to compare with them.
  • AprilGrid tags: tag_family: t36h11 is the Kalibr AprilGrid, which has a 2-bit black border round each tag. Use t36h11b1 for standard AprilTag 3 tags, which have a 1-bit border.
  • ArUco boards also work (board_type: aruco). See Configuration.
  • A Kalibr target file: no config key reads one. Copy its values into the board: block, as in section 2.

MVIS reads a printed ChArUco board as is (MVIS 0.3.0 or later). A common layout:

  • Board: 14 × 9 squares, so 13 × 8 = 104 inner corners.
  • Squares: 40 mm. Markers: 30 mm, from the OpenCV dictionary DICT_5X5_250.
config.yaml
board:
board_type: charuco
rows: 9 # squares, not inner corners
cols: 14
square_size: 0.04 # metres
marker_size: 0.03 # metres
aruco_dict: DICT_5X5_250 # must match the printed board
  • Count squares. For a ChArUco board rows and cols count squares, as board generators print them. For a chessboard they count inner corners.
  • The dictionary is required. A board read with the wrong dictionary finds no corners, so MVIS stops when it is missing. OpenCV’s name for the key, dictionary, is read the same way.
  • Boards printed with OpenCV before 4.6 with an even number of rows have another marker layout: add charuco_legacy: true. This board has 9 rows, so it does not need it.
  • Every corner is used. MVIS refines each corner after OpenCV, and needs OpenCV 4.7 or later (the aruco extra installs it). All keys: Configuration.

The VI-Rig recordings use a printed AprilGrid:

  • Grid: 6 × 6 tags, family t36h11.
  • Tag: 0.088 m, edge to edge.
  • Spacing: 0.3, the gap between tags divided by the tag size.

Its Kalibr target file, april.yaml, sits next to the bags on the Hub. It reads target_type: 'aprilgrid', tagCols: 6, tagRows: 6, tagSize: 0.088, tagSpacing: 0.3.

The same board in MVIS:

config.yaml
board:
board_type: apriltag
rows: 6
cols: 6
tag_size: 0.088
tag_spacing: 0.3
tag_family: t36h11

A printed board bends and twists a little. A solve that takes it as flat pushes that error into the calibration.

We estimated the shape of the VI-Rig board from the camera residuals:

  • Size of the bend: 10–11 mm peak to peak, 2.3–2.4 mm rms, on the mount we used. A different mount gives a different shape.
  • One run: the 4 IMUs + 4 cameras example estimates it at 2.21 mm rms and 8.94 mm peak to peak.
  • Effect: the camera-only residual drops and the focal length moves. The numbers are in Why calibrate the board shape.

Turn it on with one key. MVIS then solves one height per board corner, in camera-only and camera–IMU runs:

config.yaml
board:
# ... the fields above ...
heights_file: board_shape_4imus_4cams.yaml # optional start values (camera–IMU runs only)
estimate:
board_points: true
  • estimate.board_points: true: solves the board shape together with everything else. It is off by default. We turn it on for every VI-Rig solve.
  • board.heights_file: optional start values for the heights. Only camera–IMU runs read it. Without it the heights start flat.
  • Where a heights file comes from: a camera–IMU run with board_points: true writes <output>_board_shape.yaml next to its output. The example’s board_shape_4imus_4cams.yaml is such a file.
  • Prior: each height has a weak prior of 3 mm, so a corner the cameras never saw stays near its start. In camera–IMU runs you can change it with solve.board_height_sigma (in m). Camera-only runs keep 3 mm.
  • One board only: a camera–IMU run with several boards cannot estimate the shape.

You can show the board on a monitor. We made three full-screen images for a 2560 × 1440 monitor, with configs for MVIS and, for the first two, Kalibr:

BoardSizeDownloads
AprilGrid 6 × 6tag36h11, tag 43.47 mm, spacing 0.3image (PNG, 75 KB) · MVIS config · Kalibr config
Chessboard 10 × 7 squares9 × 6 inner corners, square 43.47 mmimage (PNG, 30 KB) · MVIS config · Kalibr config
ChArUco 14 × 9 squaresDICT_5X5_250, square 39.12 mm (144 px), marker 29.34 mm (108 px)image (PNG, 8 KB) · MVIS config

How to show them:

  1. Open the image full screen at 100 % on a 2560 × 1440 monitor.
  2. Turn off display scaling and zoom, so one image pixel is one screen pixel.
  3. Measure one tag or square with a ruler. On our monitor, 160 px (one tag or one square) is 43.47 mm, the size in the configs. The ChArUco squares are 144 px (39.12 mm), so the whole board fits on the screen.
  4. If yours differs, put your size in the config:
    • MVIS: tag_size or square_size (for the ChArUco board also marker_size, 0.75 of the square).
    • Kalibr: tagSize, or rowSpacingMeters and colSpacingMeters.

Setup:

  • Keep the screen upright and still.
  • Use enough light for a short exposure (about 2 ms), so the corners do not blur.