Skip to main content

vision-calibration-py

Python bindings for calibration-rs.

This crate exposes high-level calibration workflows from vision-calibration:

  • planar intrinsics
  • single-camera hand-eye
  • rig extrinsics
  • rig hand-eye
  • laserline device
  • scheimpflug intrinsics

Build locally

maturin develop -m crates/vision-calibration-py/Cargo.toml

Python package

The Python package name is vision_calibration.

import vision_calibration as vc

print(vc.__version__)

# Build Python-native dataset/config objects with docstrings:
obs = vc.Observation(
    points_3d=[(0.0, 0.0, 0.0), (0.1, 0.0, 0.0), (0.1, 0.1, 0.0), (0.0, 0.1, 0.0)],
    points_2d=[(100.0, 100.0), (200.0, 100.0), (200.0, 200.0), (100.0, 200.0)],
)
dataset = vc.PlanarDataset(views=[vc.PlanarView(observation=obs)] * 3)
config = vc.PlanarCalibrationConfig(
    max_iters=80,
    robust_loss=vc.robust_huber(1.0),
)

result = vc.run_planar_intrinsics(dataset, config)
print(result.mean_reproj_error)

Scheimpflug workflow:

import vision_calibration as vc

obs = vc.Observation(
    points_3d=[(0.0, 0.0, 0.0), (0.1, 0.0, 0.0), (0.1, 0.1, 0.0), (0.0, 0.1, 0.0)],
    points_2d=[(100.0, 100.0), (200.0, 100.0), (200.0, 200.0), (100.0, 200.0)],
)
dataset = vc.PlanarDataset(views=[vc.PlanarView(observation=obs)] * 3)
config = vc.ScheimpflugIntrinsicsCalibrationConfig(
    fix_scheimpflug={"tilt_x": False, "tilt_y": False}
)
result = vc.run_scheimpflug_intrinsics(dataset, config)
print(result.camera.sensor)

Migration: hard break to typed high-level API

High-level runner functions now require typed dataset/config objects. Raw mapping/list payloads are no longer accepted by:

  • run_planar_intrinsics
  • run_scheimpflug_intrinsics
  • run_single_cam_handeye
  • run_rig_extrinsics
  • run_rig_handeye
  • run_laserline_device

Before (no longer supported):

import vision_calibration as vc

result = vc.run_scheimpflug_intrinsics(
    {"views": [...]},
    {"max_iters": 80},
)

After (typed high-level API):

import vision_calibration as vc

dataset = vc.PlanarDataset(views=[...])
config = vc.ScheimpflugIntrinsicsCalibrationConfig(max_iters=80)
result = vc.run_scheimpflug_intrinsics(dataset, config)

If you still need raw serde payload control for migration/interop, use low-level helpers from vision_calibration._api (for example _run_scheimpflug_intrinsics_raw).

Runnable Python examples

Python workflow examples live in crates/vision-calibration-py/examples/ and mirror the Rust examples from crates/vision-calibration/examples/.

Install detector dependencies for real-image examples:

./.venv/bin/python -m pip install "vision-calibration[examples]"

Run all:

for f in crates/vision-calibration-py/examples/*.py; do ./.venv/bin/python "$f"; done

Run individual examples:

./.venv/bin/python crates/vision-calibration-py/examples/planar_synthetic.py
./.venv/bin/python crates/vision-calibration-py/examples/planar_real.py
./.venv/bin/python crates/vision-calibration-py/examples/stereo_session.py
./.venv/bin/python crates/vision-calibration-py/examples/stereo_charuco_session.py
./.venv/bin/python crates/vision-calibration-py/examples/handeye_synthetic.py
./.venv/bin/python crates/vision-calibration-py/examples/handeye_session.py
./.venv/bin/python crates/vision-calibration-py/examples/rig_handeye_synthetic.py
./.venv/bin/python crates/vision-calibration-py/examples/laserline_device_session.py

Notes:

  • planar_real.py, stereo_session.py, stereo_charuco_session.py, and handeye_session.py run detector-based corner extraction from real images using calib-targets.
  • vision_calibration.types is low-level compatibility surface for advanced interop only; prefer typed dataclasses/models for new code.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vision_calibration-0.8.0.tar.gz (725.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

vision_calibration-0.8.0-cp310-abi3-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.10+Windows x86-64

vision_calibration-0.8.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

vision_calibration-0.8.0-cp310-abi3-macosx_11_0_arm64.whl (1.7 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

Details for the file vision_calibration-0.8.0.tar.gz.

File metadata

  • Download URL: vision_calibration-0.8.0.tar.gz
  • Upload date:
  • Size: 725.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for vision_calibration-0.8.0.tar.gz
Algorithm Hash digest
SHA256 2b066a5f6924c42978ab27290af3ebf743b426d7232ac28566393057003ecff9
MD5 bbf524ccacae7edc0e3fdb7c92779f1c
BLAKE2b-256 96ce9d9e9e13cd7dc2d5c435ad525cc43dfa1a37168f3fe9c937c9e59363362a

See more details on using hashes here.

Provenance

The following attestation bundles were made for vision_calibration-0.8.0.tar.gz:

Publisher: release-pypi.yml on VitalyVorobyev/calibration-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vision_calibration-0.8.0-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for vision_calibration-0.8.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b6a4d78b2fefaa806a257e5999cdb1fd5a479b1c3b8f8632ecbd64c46a54ad3f
MD5 e2c56227a2d2112f075bf3ff8206f44d
BLAKE2b-256 33279f2893525851c950e4894bcaeea9d7f0691b6976314ac46926dbf4297a9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for vision_calibration-0.8.0-cp310-abi3-win_amd64.whl:

Publisher: release-pypi.yml on VitalyVorobyev/calibration-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vision_calibration-0.8.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vision_calibration-0.8.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b5e64a073e2fb61cf858881656d1440983e1f4135cca94805c76c0877198144d
MD5 bcd5649cec12e7dd07cac70b9a31b443
BLAKE2b-256 34cb1f060a93847b67a16df62819f98126c24be701d8bb5af2e1f83c0f6af2ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for vision_calibration-0.8.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release-pypi.yml on VitalyVorobyev/calibration-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vision_calibration-0.8.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vision_calibration-0.8.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 93335193847d257eae93355ab8bf90411dccbac488564b62d10683e7f8724cd7
MD5 7bd27ad462d3ad77d45b506c714975a5
BLAKE2b-256 de729e5b8504b672b2f146fc8333fc409ed0ad351e7f5a941bc72fec6472227a

See more details on using hashes here.

Provenance

The following attestation bundles were made for vision_calibration-0.8.0-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release-pypi.yml on VitalyVorobyev/calibration-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.8.0 This release

4 files

0.7.0

4 files

0.6.0

4 files

0.5.1

4 files

0.3.0

4 files

0.2.0

4 files

0.1.4

4 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page