Metadata-Version: 2.4
Name: caliscope
Version: 0.11.3
Summary: Rapid and reliable multicamera calibration with GUI and scripting API
Project-URL: repository, https://github.com/mprib/caliscope
Author-email: Mac Prible <prible@gmail.com>
License: BSD-2-Clause
License-File: LICENSE
Requires-Python: <3.14,>=3.10
Requires-Dist: av>=16.1.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: opencv-python>=4.8.0.74
Requires-Dist: pandas>=1.5.0
Requires-Dist: platformdirs>=4.3.8
Requires-Dist: rich>=13.0.0
Requires-Dist: rtoml>=0.9.0
Requires-Dist: scipy>=1.10.1
Requires-Dist: typing-extensions>=4.0.0
Provides-Extra: gui
Requires-Dist: onnxruntime>=1.16.0; extra == 'gui'
Requires-Dist: pyside6-addons>=6.10.2; extra == 'gui'
Requires-Dist: pyside6-essentials>=6.10.1; extra == 'gui'
Provides-Extra: tracking
Requires-Dist: onnxruntime>=1.16.0; extra == 'tracking'
Provides-Extra: tracking-gpu
Requires-Dist: onnxruntime-gpu>=1.16.0; extra == 'tracking-gpu'
Description-Content-Type: text/markdown

<div align="center">

# Caliscope

*Multicamera Calibration for Motion Capture*

[![PyPI - Downloads](https://img.shields.io/pypi/dm/caliscope?color=blue)](https://pypi.org/project/caliscope/)
[![PyPI - License](https://img.shields.io/pypi/l/caliscope?color=blue)](https://opensource.org/license/bsd-2-clause/)
[![PyPI - Version](https://img.shields.io/pypi/v/caliscope?color=blue)](https://pypi.org/project/caliscope/)
[![GitHub last commit](https://img.shields.io/github/last-commit/mprib/caliscope.svg)](https://github.com/mprib/caliscope/commits)
![pytest](https://github.com/mprib/caliscope/actions/workflows/pytest.yml/badge.svg)
</div>

3D motion capture requires knowing each camera's intrinsic properties (focal length and lens distortion), as well as where the cameras sit relative to each other in space.
With these parameters, observations from multiple cameras can be triangulated into accurate 3D coordinates.

Caliscope efficiently estimates these parameters with a scriptable Python API as well as a GUI that offers visual feedback during each stage of the calibration.


## Demo

Note that the workflow below is from v0.9.0 and will soon be updated with v0.10.0

https://github.com/user-attachments/assets/b8bb78de-866e-4ba2-b5c7-674e3a33dd9e

## Install

```bash
uv pip install caliscope        # calibration library + scripting API
uv pip install caliscope[gui]   # adds desktop app, 3D visualization, and pose tracking
caliscope                       # launch the app
```

Full instructions at [mprib.github.io/caliscope/installation](https://mprib.github.io/caliscope/installation/).

## Features

| Feature | What it does |
|---------|-------------|
| Pairwise PnP initialization | Chains stereo pair estimates transitively, so the target never needs to be visible to all cameras at once |
| Flexible targets | ChArUco boards, ArUco markers, and chessboards. A single marker on a sheet of paper can calibrate a wide volume |
| Mirror boards | A board printed on both sides links cameras that never share a common view |
| Outlier filtering | Filter by reprojection error and re-solve |
| Aniposelib export | `camera_array_aniposelib.toml` for [Pose2Sim](https://github.com/perfanalytics/pose2sim), [anipose](https://anipose.readthedocs.io/), and other aniposelib-compatible tools |

## Scripting API

The base install exposes calibration as Python functions.
See the [scripting docs](https://mprib.github.io/caliscope/scripting/) for a walkthrough.

## Reconstruction

A basic reconstruction pipeline is included for verifying calibration quality: ONNX pose tracking, triangulation, and CSV/TRC export.
For production reconstruction, use Pose2Sim or anipose with Caliscope's exported calibration.

## Getting started

[Sample project](https://mprib.github.io/caliscope/sample_project/) with downloadable data.
[Full documentation](https://mprib.github.io/caliscope/).

Bugs: [Issues](https://github.com/mprib/caliscope/issues). Questions: [Discussions](https://github.com/mprib/caliscope/discussions).

## Acknowledgments

Inspired by [anipose](https://github.com/lambdaloop/anipose), created by Lili Karashchuk, PhD.

## License

[BSD 2-Clause](https://opensource.org/license/bsd-2-clause/)
