Camera calibration is a method that uses images of a known pattern to estimate the internal characteristics of the camera used to acquire them. The calibration algorithm is based on a mathematical model, the pinhole camera model [link to the second blog], which allows us to calculate the camera's intrinsic parameters associated with the lens and image sensor, as well as the distortion coefficients which can be used to undistort the image and obtain precise measurements of objects in the real world.
Calibration is an essential first step in digital image analysis, as a calibrated camera will provide more accurate measurements. However, it can only be as precise as the procedure and tools employed, which is why we need to be meticulous when preparing our setup to achieve optimal results.
In this blog, we will discuss the best practices to achieve accurate camera calibration, and explore software tools that help with the necessary mathematical calculations as well as techniques to evaluate our results and improve the performance of our calibration.
The reprojection error is the difference between the detected features and their corresponding projected image points. It allows us to measure how accurate the found parameters are; the lower the reprojection error, the more reliable the estimated parameters.
Although the reprojection error is a good qualitative reference, obtaining a low value does not necessarily mean that we achieved a good calibration, as it only indicates that the data provided can be described with the estimated model. A possible reason for bad calibration performance could be due to overfitting, for example, if all your calibration images are taken from a very similar distance and angle, the reprojection error can be low and calibration might be very accurate for a specific viewpoint, but perform poorly for others.
These views also allow you to check whether the image set achieved sufficient coverage of the field of view. However, for this, there are also other options, such as using the open-source tool mrcal.
For optimal results, ensure the dataset provides full coverage. If you are able to spot any noticeable gaps it is important to capture additional images of the missing views to achieve reliable calibration.
Leave A Reply