Skip to main content

Calibration output files

When you export, realtime-calib writes one file per selected target. Every target carries the same calibration — the same intrinsics and 6-DoF poses — in a different shape and coordinate convention. Everything lands in the session folder, which is the source of truth for a run.

Files written​

FileFormatFor
camera_array.tomlCaliscope-native TOMLCaliscope (v0.7 and later)
camera_array_aniposelib.tomlaniposelib TOMLPose2Sim, anipose, and Caliscope ≤ 0.5.4 projects
camera_array_opencv.jsonVersioned JSON contractOpenCV pipelines
camera_array_threejs.jsonEngine JSONthree.js / OpenGL
camera_array_blender.jsonEngine JSONBlender / ROS
camera_array_unity.jsonEngine JSONUnity
camera_array_unreal.jsonEngine JSONUnreal
checks.jsonJSONThe pre-export checks, always included

You pick which targets to export (any subset) and the length unit (mm or m). The unit applies to the aniposelib TOML and the engine JSON files; camera_array.toml and camera_array_opencv.json are always in metres. The download is one archive, calibration_export.zip, holding only the current selection. The session folder also holds the recordings, board config and computed results.

In every file, the intrinsics refer to the output resolution (native × resize factor), with K mapped at pixel centres the way cv2.resize maps them (see Configure cameras), and every error is in pixels at that resolution.

Coordinate conventions​

Each engine JSON is written in its target's world convention — a combination of up axis (Y or Z) and handedness (left or right):

Y-up vs Z-up crossed with left- vs right-handed axis triads

Coordinate conventions. The four world conventions realtime-calib exports to — up axis (Y or Z) combined with handedness (left- or right-handed).

Each convention maps to a target engine:

Convention grid labelled with Unity, OpenGL, Unreal, Blender and ROS

Target software per convention. Unity (Y-up, left-handed), three.js / OpenGL (Y-up, right-handed), Unreal (Z-up, left-handed), Blender / ROS (Z-up, right-handed).

Both TOMLs keep the solver's native world: OpenCV axes (right-handed, Y-down, Z-forward). The OpenCV JSON uses the three.js world (Y-up, right-handed), so both of them place the cameras identically.

Caliscope TOML (camera_array.toml)​

The file Caliscope itself writes and loads: one [cameras.N] table per camera, keyed by the camera index. Native field semantics are preserved; project-specific fields are strictly additive, and Caliscope ignores them.

FieldMeaning
cam_idCamera index (the table key)
sizeImage size [width, height] the intrinsics refer to (the export resolution)
rotation_countSensor rotation in quarter turns — always 0
errorIntrinsic reprojection error (RMS, px)
matrix3×3 intrinsic matrix
distortionsDistortion coefficients — 5, OpenCV classic model [k1, k2, p1, p2, k3]
translationExtrinsic translation (world→camera), always in metres
rotationExtrinsic rotation, Rodrigues vector (world→camera)
grid_countNumber of board views (keyframes) used for the intrinsic solve
fisheyeLens model flag — always false

Additive extensions: name (operator label) and device_path (stable V4L identifier).

[cameras.0]
cam_id = 0
size = [ 1920, 1080 ]
rotation_count = 0
error = 0.21
matrix = [ [ 1000.0, 0.0, 960.0 ], [ 0.0, 1000.0, 540.0 ], [ 0.0, 0.0, 1.0 ] ]
distortions = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]
translation = [ 0.0, 0.0, 0.0 ]
rotation = [ 0.0, 0.0, 0.0 ]
grid_count = 24
fisheye = false
name = "cam_0"
device_path = "/dev/v4l/by-path/pci-0000:00:14.0-usb-0:1:1.0-video-index0"

Files exported by earlier realtime-calib versions used top-level [cam_N] tables instead, which recent Caliscope versions read as an empty camera array: export them again.

aniposelib TOML (camera_array_aniposelib.toml)​

The layout aniposelib reads (CameraGroup.load), used by Pose2Sim and anipose: one top-level [cam_N] table per camera, plus a [metadata] table.

FieldMeaning
name, size, matrix, distortions, rotation, fisheyeAs in camera_array.toml
translationExtrinsic translation (world→camera), in the selected export units
port, rotation_count, error, grid_countWhat Caliscope ≤ 0.5.4 reads from its config.toml
device_pathAdditive extension (stable V4L identifier)

[metadata] holds adjusted = false: the poses were not refined by anipose's own bundle adjustment.

Exported in metres, the [cam_N] tables paste unchanged into the config.toml of a Caliscope ≤ 0.5.4 project. Exported in millimetres, that project would read a world 1000 times too large.

OpenCV JSON (camera_array_opencv.json)​

A versioned contract ("format": "realtime-calib/opencv-cameras", "version": 1) for pipelines that project with OpenCV: the poses load as they are, with no axis conversion. Within a version, each field keeps one meaning: a reader ignores unknown fields, an addition keeps the version, a change of meaning bumps it.

  • convention: the pose formula x_cam = R · x_world + t, the camera axes (OpenCV: x right, y down, z forward), the world (right-handed, Y up, metres), and the basis from the solver's world.
  • world: where the world comes from. frame is target (framed on a board), reference (aligned on a previous calibration, with an alignment block), anchor_camera (the anchor still at the origin) or unknown; origin describes it in words. up = "y" is present only when verified: the framed target level within 1°, printed face up, every camera above it. target_offset_m says how far a Minimize moved the framed target off the origin.
  • source: the session, the export time and the service version.
  • cameras, sorted by port:
FieldMeaning
portCamera index in the session (an order, not an identity)
nameOperator label
device_pathThe camera's identity (stable V4L path); null for an imported session
resolution[width, height] the intrinsics refer to (the export resolution)
K3×3 intrinsic matrix
distCoef[k1, k2, p1, p2, k3]
R3×3 rotation, world → camera
t3×1 translation column, world → camera, always in metres
intrinsic_error_pxIntrinsic reprojection error (RMS, output px)
extrinsic_error_pxExtrinsic reprojection error of this camera (output px), never mixed with the intrinsic one

This is also the file to keep as a reference for aligning a later calibration on the same room.

Engine JSON (camera_array_<target>.json)​

A self-describing document: a top-level convention block (up axis, handedness, axis mapping, camera_forward / camera_up), the world_units, the anchor camera name, and a cameras array.

Each camera carries a scene form — what a scene graph applies to place the camera object:

FieldMeaning
positionCamera position in world units (mm or m)
quaternionCamera orientation [x, y, z, w] (camera→world)
matrix4×4 camera→world transform
intrinsics{ resolution, matrix, distortions, fov_deg }
errorThe camera's extrinsic reprojection error (output px), or its intrinsic one when the array is not solved
name, device_pathAs in the TOMLs

Right-handed targets (three.js, Blender) additionally carry a view form — the OpenCV-style extrinsic for projection (x_cam = R · x_world + t):

FieldMeaning
view.R3×3 rotation, world→camera
view.ttranslation vector, world→camera (world units)

Left-handed targets (Unity, Unreal) omit the view form: their world basis includes a mirror (det = −1), which would make the view rotation improper (a reflection, not a rotation) — project through the engine's own camera API instead.