Skip to main content

Python bindings for calibration-rs end-to-end camera calibration

Project description

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

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)

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.
  • Low-level serde payload schemas remain available in vision_calibration.types for advanced interop.

Project details


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.1.4.tar.gz (313.7 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.1.4-cp310-abi3-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.10+Windows x86-64

vision_calibration-0.1.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB view details)

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

vision_calibration-0.1.4-cp310-abi3-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: vision_calibration-0.1.4.tar.gz
  • Upload date:
  • Size: 313.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vision_calibration-0.1.4.tar.gz
Algorithm Hash digest
SHA256 072cdd46c2a837fa157b91c88e12f577551b7b71d1e8e9083b8bef70b5d96195
MD5 5b07c6bd1f12f0ca20f070299cc4c2c8
BLAKE2b-256 3dfb1862de2e59e73e442f3263d73b50db7ddf0b8e3f480c5c0dcbd5710d97e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for vision_calibration-0.1.4.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.1.4-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for vision_calibration-0.1.4-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 dda22cc28a34ea6e00fc6aa73fa035101cdd3b81d0273669e3c1b3d3c348a610
MD5 a8a75d84b754693063014432245e8356
BLAKE2b-256 2fb7557ca6c3e8a02bf435bae84cb3c927b52ee2904743b72c1e701f3654d0fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for vision_calibration-0.1.4-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.1.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vision_calibration-0.1.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8df1cc8334a40afeb59cf66c49e624f062fd09f045c4124f0f1d7cb1045a9960
MD5 c4e890f24de79a84d956bfa09e4cad8f
BLAKE2b-256 2edc36a477b59b195d1fbb6645bf5f99c2c8367200e40400f216a94ae56a6a1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for vision_calibration-0.1.4-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.1.4-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vision_calibration-0.1.4-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 774c28270eed62bd16237be5a402ae2188abc437d3f104ce648f8a3928fe7807
MD5 e56d79919e8f0247de921908ea7c2fe5
BLAKE2b-256 b6faca63adddd479491595b3a9c654535271672dc7245815ff6758e510048ec0

See more details on using hashes here.

Provenance

The following attestation bundles were made for vision_calibration-0.1.4-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.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page