Calibration Patterns Explained

Calibrating cameras accurately is important for the success of any machine/computer vision setup. However, there are different patterns to choose from. In order to make the selection easier for you, this article explains the main benefits of each.

A selection of the calibration patterns we offer at CharuCo, chessboard, asymmetric circles and chessboard.


Pattern size

In choosing a calibration plate, an important consideration is the physical size of it. This ultimately relates to the measurement field of view (FOV) of the final application. This is because cameras need to be focused on that specific distance and calibrated. Changing the focus distance slightly affects focal length, which would throw any previous calibration off. Even aperture changes usually have a negative effect on calibration validity, which is why they should be avoided.  

For accurate calibration, the camera model is best constrained if the camera sees the calibration target filling most of the image. Popularity speaking, if a small calibration plate is used, many combinations of camera parameters could explain the observed images. As a rule of thumb, the calibration plate should have an area of at least half the available pixel area when observed frontally.


Pattern type

Different patterns have been introduced over the years, with each having unique properties and benefits. 

Choosing the right type starts by considering which algorithm and algorithm implementation you will be using. In general purpose libraries such as OpenCV or MVTec Halcon, there is some freedom regarding the pattern, and they have individual benefits and limitations.


Checkerboard targets

This is the most popular and common pattern design. Chessboard corners candidates are usually found by first binarizing the camera image and finding quadrilaterals (these are the black chessboard fields). A filtering step retains only those quads that meet certain size criteria and are organized in a regular grid structure whose dimensions match those specified by the user. 

After an initial detection of the pattern, the corner locations can be determined with very high accuracy. This is because corners (mathematically: saddle points) are principally infinitely small and hence unbiased under perspective transformations or lens distortion. 

In OpenCV, the entire chessboard must be visible in all images in order to be detected. This usually makes it difficult to obtain information from the very edges of images. These areas are usually good to have information from, as they constrain the lens distortion model properly.

Following the detection of a checkerboard, subpixel refinement can be performed to find the saddle points with subpixel accuracy. This makes use of the exact gray values of pixels around a given corner position, and the accuracy is much more accurate than what integer pixel positions would allow for.

You can inspect the source code for OpenCV's checkerboard detector here. An important detail regarding checkerboard targets is that in order to be rotation-invariant, the number of rows needs to be even and the number of columns odd, or the other way around. If for instance, both are even, there is a 180-degree rotation ambiguity. For single camera calibration, this is not an issue, but if the same points need to be identified by two or more cameras (for stereo calibration), this ambiguity must not exist. This is the reason why our standard checkerboard targets all have this property of even/odd rows/columns.


Circle grids 

Circle girds are also a popular and very common calibration target design, based on circles, either with white circles on dark background or dark (black) circles on white background. In image processing terms, circles can be detected as "blobs" in the image. Some simple conditions on these binary blob regions, such as area, circularity, convexity, etc. can be applied to remove bad feature candidates. The 

After finding suitable candidates, the regular structure of features is again used to identify and filter the pattern. The determination of circles can be done very accurately since all pixels on the periphery of circles can be used, decreasing the influence of image noise. However, in contrast to the saddle points in checkerboards, circles are imaged as ellipses under camera perspective. This perspective can be accounted for by means of image rectification. However, in addition, the unknown lens distortion means that the circles are not imaged as perfect ellipses, which adds a small bias. However, we can consider the distortion model as piecewise linear (obeying a perspective transformation / homography), so this error is very small in most lenses. 

An important difference between symmetric and asymmetric circle grids is that the former have a 180-degree ambiguity as explained in the "Checkerboard" section. Hence, for stereo calibration, asymmetric grids are necessary. Otherwise, there is not a big difference in the performance one should expect for either type. 

OpenCV source code for circle grid detection is found here.


CharuCo targets

CharuCo patterns overcome some of the limitations of classical checkerboards. However, their detection algorithm is somewhat more complex. Luckily, CharuCo detection is part of OpenCVs contrib library (since OpenCV 3.0.0), making it very easy to integrate this advanced method. 

The main advantage with CharuCo is that all light checker fields are uniquely coded and identifiable. This means that even partly occluded or non-ideal camera images can be used for calibration. For instance, strong ring lights may produce inhomogenous lighting on the calibration target (a region of semi-specular reflection), which would cause ordinary checkerboard detection to fail. With CharuCo, the remaining (good) saddle point detections can still be used. Saddle point localizations can be refined using subpixel detection just like checkerboards.

With observations close to image corners, this is an extremely useful property. As the target can be positioned such that the camera only sees it partly, we can gather information from the very edges and corners of the camera image. This usually leads to very good and robust determination of lens distortion parameters. For this reason, we highly recommend the use of CharuCo targets, when OpenCV 3.x is available.

Naturally, CharuCo targets can be used for stereo calibration. In this case, some code needs to be implemented to find those points that were detected in each camera individually, and those that were found in both (the intersection of points). 


Leave a comment

Please note, comments must be approved before they are published