CameraCalibration

Contains intrinsic and extrinsic calibration parameters for a camera.

Panel support

CameraCalibration is supported in the following panels: 3D and Image.

Schema

FieldTypeDescription
timestamptimeTime at which the calibration parameters are valid.
frame_idstringReference frame of the camera. The origin is the optical center. +X points right, +Y points down, and +Z points into the image plane.
widthuint32Image width in pixels.
heightuint32Image height in pixels.
distortion_modelstringDistortion model used for the camera lens.
Dfloat64[]Distortion coefficients, format depends on the chosen model.
Kfloat64[9]Intrinsic matrix of the raw (distorted) image, in 3x3 row-major format.
Rfloat64[9]Rectification matrix for stereo configurations, 3x3 row-major format.
Pfloat64[12]Projection matrix of the rectified image, 3x4 row-major format.

Distortion models

The following distortion models are supported:

  • plumb_bob: k1, k2, p1, p2, k3
  • rational_polynomial: k1, k2, p1, p2, k3, k4, k5, k6
  • kannala_brandt: k1, k2, k3, k4

The plumb_bob and rational_polynomial models are based on OpenCV’s pinhole model.
The kannala_brandt model corresponds to OpenCV’s fisheye model.

K — Intrinsic matrix

A 3x3 matrix used to project 3D camera coordinates to 2D pixel coordinates:

[fx  0  cx]
[ 0 fy  cy]
[ 0  0   1]

Where fx, fy are the focal lengths, and cx, cy are the optical center.

R — Rectification matrix

Used to align the camera’s coordinate frame with a common stereo image plane, ensuring the epipolar lines are parallel in both images.

P — Projection matrix

[fx'  0  cx'  Tx]
[ 0  fy' cy'  Ty]
[ 0   0   1    0]

This matrix projects 3D points into rectified 2D image space using possibly updated intrinsics (fx', fy', cx', cy').
For monocular setups, Tx = Ty = 0.

In stereo configurations:

  • The first (left) camera has Tx = Ty = 0.
  • The second (right) camera usually has Ty = 0, and Tx = -fx' * B, where B is the baseline distance.

Given a 3D point [X Y Z]', its projection [x y] on the image is computed as:

[u v w]' = P * [X Y Z 1]'
x = u / w
y = v / w

This applies to both images in a stereo pair.

Reference implementations

Foxglove schemas are implementation-independent and can be used with any of the supported message encodings: