Full Body Pose Estimation for Sports Analysis - AprilTag Camera Calibration

From RidgeRun Developer Connection
Jump to: navigation, search



Previous: Camera Calibration Index Next: Chessboard Camera Calibration




This wiki summarizes the documentation of the AprilTag based multi-camera calibration. It contains information such as how the method works, how to set up the environment for use, and how to build a calibration object.

Introduction

This module provides the user with a calibration method that works with a 3D calibration object. This makes easier the process of calibrating a multi-camera system, due to the ability to capture the same calibration object from different angles, as shown in the next image. This becomes a great advantage over a calibration method that uses a chessboard like a calibration object.

Error creating thumbnail: Unable to save thumbnail to destination
Model of a dual-camera system capturing AprilTag calibration object.

Description

This calibrator class uses AprilTag library from AprilRobotics to identify the specific tags that compose a calibration object. The library is written in C, however, it also offers python bindings. Also, as mentioned in AprilTag User Guide, the library offers multiple sets of tag families, and there is also the possibility of creating a custom one if required.

The idea behind using these tags to build a 3D calibration object relies on the ability to identify specific object faces. By providing the calibrator with the known object points that compose the calibration object, it uses OpenCV's camera calibration functions to compute the extrinsic camera parameters.

Getting started

In this section, you will find information on how to set up your environment to use this calibration method. It will also contain details on how to build a 3D calibration object and how to provide the object information to the calibrator.

Setting-up the environment

To get the environment ready for using the AprilTag calibration, you only need to install AprilTag library by following the instructions provided in the AprilTag repository.

The calibration object

The calibration object's shape depends on the multi-camera system application. The more faces the object has, the easier it is to be captured from different angles. Also, by including more tags into the object composition, the more object to image points relations can be used by the calibrator to make a more precise estimation of the camera calibration parameters.

As already mentioned, the calibration object structure is only limited by your imagination and resources, however, a very simple and rather useful object to build is a calibration cube. By only using six AprilTags, one for one each of the faces, this calibration object can be made out of a simple cardboard box.

On the AprilTag user guide, you will find that they offer various tag sets, for you to choose the one that fits your needs. As an example, we can choose the first six tags out of the tagStandard41h12 set to build our calibration cube.

AprilTag calibration cube model.

Now, the precision of the calibration parameters calculated is directly related to the quality of your calibration object. The higher the tolerances and the sturdier the material used for the construction of the cube, the better results you will get. However, if the application is not critical, the calibration cube could be built out of a re-utilized cardboard box and still deliver good results. For example, the following image shows a calibration cube made out of a reused cracker box.

Error creating thumbnail: Unable to save thumbnail to destination
AprilTag calibration cube made out of cardboard.

To let the calibrator know which object points to use for calibration, you must specify the 3D coordinates of the corners for each of the AprilTags that compose your calibration object. This is achieved by setting the value of the variable obj_points to a dictionary with each of the tags id's as keys and a multi-dimensional array holding the 3D position of its corners. The array containing the 3D corner positions must follow the following order: [Left-bottom corner, Right-bottom corner, Right-top corner, Left-top corner].



Previous: Camera Calibration Index Next: Chessboard Camera Calibration