Calibrating cameras and IMUs

Separate image parameters, mounting positions and timing to find the causes of error systematically

Last updated:

A camera rig facing a checkerboard target, illustrating the concept of calibration
AI-generated concept illustration

Calibration is not a single value

Calibration: Intrinsics, Extrinsics and Time offset, the camera lens has focal length/principal point/distortion, arrows show rotation and translation between the camera frame and the IMU, and a timeline compares camera frames with IMU samples offset by Δt

Intrinsics describe the camera model, such as focal length, principal point and distortion, while extrinsics describe the rotation and translation between sensors. Time offset is a time difference that must be handled separately. A number that looks small can matter when motion is fast

Use Kalibr with evidence

Use Kalibr with evidence: choose the camera model and data format → check the target size and units against the real object → check the quality of target detection and the spread of sample poses → accept/review the calibration report

Choose a camera model and data format supported by the tool, check the calibration target size and units against the real object, and look at target detection quality and the spread of samples before trusting the result. A value computed by the program does not confirm that the report suits every operating condition

What to check What could happen if it is wrong
frame / units Positions or orientations do not correspond
Target size / camera model Geometric values estimated incorrectly
Timing and data order Camera and IMU represent different moments
Mounting and vibration The relationship between sensors changes

Try camera calibration with OpenCV

Reprojection error results from the OpenCV sample board images, separating the images used for calibration from those held out for checking

The actual experiment used 13 OpenCV sample chessboard images, with 54 inner corners detected per image. 10 images were selected to estimate the camera parameters, and left03, left07 and left12 were held out before calibration started. The RMS per-point error for the calibration set was about 0.4514 pixels while the three held-out images were about 0.2178 pixels

When checking the latter three images, we fixed the camera and distortion parameters but still estimated the board pose in each image with solvePnP. This score therefore measures the consistency of point projection in the image, not a measurement of pose against true position. A score lower than the calibration set does not prove the camera is accurate in every scene

The exercise sets the chessboard square side to 1 unit because there is no measured target size, so the resulting translation is in chessboard-square units, not metres , and camera–IMU calibration has not yet been done. Read the guide with reproducible steps and camera parameters/per-image results/data provenance , then use your own images and target size when you need to calibrate real equipment

Separate the calibration set from the test set

Keep the report together with the config and version, then check with data from another period. Change one factor at a time to find causes. Do not report only the lowest number from many trials without explaining how it was chosen

Kalibr has its own LICENSE that must be read, including acknowledgment conditions in some cases. The examples on this website are study guidance, not a certification of calibration values for learners' hardware

Practise evaluating results and timestamps →

References and scope

Sources checked 7 September B.E. 2569 (2026); compiled to accompany knowledge kindly contributed by DTI

Acknowledgements and sources

F16: reprojection RMSE divided by the number of points or the number of axes

A residual arrow from the projected point to the measured point, 3 px horizontally and 4 px vertically, with a length of 5 px

Variable Meaning and units in → out Range/source of values
dx_i,dy_i observed − projected on the image axes, px (in) finite; match the same points and use images of the same size
n Total number of 2D points (in) Integer > 0; includes every declared view
RMSE_point RMS of the 2D distance per point, px (out) ≥ 0; divide by n
RMSE_component RMS per scalar component, px (out) ≥ 0; divide by 2n, a different definition from the value above

Applied level · Question: overall, how far are the points projected by the model from the points detected in the image?

RMSE_point = √[Σ(dx_i² + dy_i²)/n]

RMSE_component = √[Σ(dx_i² + dy_i²)/(2n)]

Pin the meaning to monocular calibrateCamera in OpenCV 4.10.0: the source returns sqrt(reprojErr/total) where total is the number of points, not 2n. The second equation is there to show the effect of changing the definition, not to be used interchangeably. Reporting a global metric requires summing the squared errors and point counts over all views; do not average per-view RMSE with equal weights and call it the global RMS

This example is computed from the given residuals; no calibration solver was run. A small value on the fit set does not confirm results on new images. Resolution, lens/focus, distortion model, flags, pattern dimensions and test views must be kept separately. NoData or mismatched point pairs must be fixed first; for n=0, report that there is no data rather than giving 0

Worked substitution example

Two points have residuals (3,4) px and (0,0) px. The sum of squares = 3²+4²+0+0 = 25 px², so RMSE_point = √(25/2) = 3.535534 px and RMSE_component = √(25/4) = 2.5 px, not the mean distance (5+0)/2

Exercise: change the values

Change the second residual to (3,4) px, keep the first unchanged, and compute both definitions

Show F16 answer

Sum = 50 px²; RMSE_point = √(50/2) = 5 px; RMSE_component = √(50/4) = 3.535534 px. Tolerance ±0.000001 px; the denominator must be written with the answer

Reference: OpenCV 4.10.0, Camera Calibration and 3D Reconstruction (P3E06) · OpenCV 4.10.0, calibration.cpp, cvCalibrateCamera2Internal (P3E07); checked 26 September B.E. 2569 (2026)

Connecting knowledge with missions and data

Record the camera parameters, the camera–IMU relationship and timing, including the version of the data used for calibration. Keep calibration results separate from trajectory evaluation results, because values that fit the calibration set do not confirm performance on other data Read the reference: ETH Zürich, Kalibr

Practice check: List the camera model, units, timestamp convention and calibration file name before replaying data. Do not adjust values without a record

Read more Lessons that apply this knowledge in simulated work · sources reviewed 26 September B.E. 2569 (2026)

Download the engineering and sensor formula practice set (CSV/JSON with answers) · synthetic data for practising calculations and checking assumptions

Used in courses

How to cite this page

Drone Institute, Rangsit University. (2026). Calibrating cameras and IMUs. In UAS Technology Knowledge Hub (B.Tech.). https://rsu-uat.pk-research.work/en/kb/knowledge/visual-inertial/calibration/

Original from Drone-Hub: https://drone.pk-research.work/knowledge/visual-inertial/calibration/ · © PK-Research