Skip to content
mpribPublic

Repository files navigation

Caliscope

Multicamera calibration for 3D motion capture

PyPI - Downloads PyPI - License PyPI - Version GitHub last commit pytest

Caliscope is an open-source Python toolkit that calibrates multicamera rigs for 3D motion capture. From calibration videos, it estimates each camera's focal length and lens distortion, as well as its position and orientation relative to the other cameras. Run it from the desktop app, which visualizes each stage of processing, or from the scripting API for routine workflows.

Calibration features

Feature What you can do
Partial camera overlap Calibrate without every camera seeing the target at once. Each camera can link to the rest by chaining together links formed from common views.
Double-sided targets Use both faces of a calibration target for cameras facing each other. See the target guide for how to build and configure one.
Measured marker distances Add measured distances between ArUco markers for the optimizer to fit to.
Calibration review Inspect overlapping calibration board views, reprojection error, and scale accuracy of the calibration target.
Align to calibration board origin Set the world origin and axes from the board's position in a chosen video frame.
Align to vertical from video Estimate which way is up from each camera's video. Scripting API only.
Calibration export Save the calibration as TOML, with an aniposelib-compatible copy for Pose2Sim and anipose.

In the desktop app, calibrate lenses with a ChArUco board or chessboard, and camera positions with a ChArUco board or ArUco markers. The scripting API also accepts a chessboard for camera positions. The measured dimensions of your calibration target set the scale of the result.

An experimental markerless workflow calibrates camera positions from a person moving through the scene instead of a target (lens calibration required in advance).

Install

uv pip install caliscope             # calibration library and scripting API
uv pip install "caliscope[tracking]" # adds pose tracking and vertical estimation to the API
uv pip install "caliscope[gui]"      # adds the desktop app and 3D viewer, and includes tracking
caliscope                            # launch the app

See the installation guide for full setup. Try the sample project with downloadable data.

Scripting

The scripting API runs the same calibration code as the app, and adds steps the app does not have. For example, after calibrating, you can level the rig from its own video:

from caliscope.api import CaptureVolume, estimate_vertical

volume = CaptureVolume.load("capture_volume")
videos = {0: "cam_0.mp4", 1: "cam_1.mp4", 2: "cam_2.mp4"}

vertical = estimate_vertical(videos, volume.camera_array)
volume = volume.oriented(up=vertical.up_per_cam)  # +Z now points up
volume.save("capture_volume_level")

Vertical estimates come from a GeoCalib model converted to ONNX. Because they work from images alone, expect them to land within a few degrees of true vertical. They need the [tracking] extra, and the model downloads on first use. The scripting guide covers the full workflow, including setting world scale and the floor plane without a board.

Demo

Recorded with v0.9.0. The current interface differs.

5_cam_demo_small.mp4

Reconstruction

To check calibration quality, the desktop app can also track landmarks with ONNX pose models, triangulate them in 3D, and export CSV and TRC files. See Tracking & Triangulation for the workflow. For anything beyond a quality check, use a dedicated tool such as Pose2Sim.

Documentation and help

Full documentation. Questions: Discussions. Bugs: Issues.

Acknowledgments

Inspired by anipose, created by Lili Karashchuk, PhD.

License

BSD 2-Clause

Releases

Packages

Used by

Contributors

Languages