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
- 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_intrinsicsrun_scheimpflug_intrinsicsrun_single_cam_handeyerun_rig_extrinsicsrun_rig_handeyerun_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, andhandeye_session.pyrun detector-based corner extraction from real images usingcalib-targets.vision_calibration.typesis low-level compatibility surface for advanced interop only; prefer typed dataclasses/models for new code.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vision_calibration-0.3.0.tar.gz.
File metadata
- Download URL: vision_calibration-0.3.0.tar.gz
- Upload date:
- Size: 339.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82229dcd13c6ea23f33b91ef04727daf241d966d3eef4f9a184fd0a4d3c45ed8
|
|
| MD5 |
274eb796410a5b31b9d618343c902f53
|
|
| BLAKE2b-256 |
36f91e3c5a237087323e8e821ca9e31e3fb41b7300dd36fabff113b5f389986e
|
Provenance
The following attestation bundles were made for vision_calibration-0.3.0.tar.gz:
Publisher:
release-pypi.yml on VitalyVorobyev/calibration-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vision_calibration-0.3.0.tar.gz -
Subject digest:
82229dcd13c6ea23f33b91ef04727daf241d966d3eef4f9a184fd0a4d3c45ed8 - Sigstore transparency entry: 1280955457
- Sigstore integration time:
-
Permalink:
VitalyVorobyev/calibration-rs@1796836963129e9d9bac85f521cc0d1cbabe68fd -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/VitalyVorobyev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@1796836963129e9d9bac85f521cc0d1cbabe68fd -
Trigger Event:
push
-
Statement type:
File details
Details for the file vision_calibration-0.3.0-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: vision_calibration-0.3.0-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ee6b7c787052ff8f65ff3cc7f10a00ac439f4805e2c27ada4924ccaa67beb19
|
|
| MD5 |
33ef44843362c72217f0f146c98f85d6
|
|
| BLAKE2b-256 |
68a82b5e591a82f871d04c154577139995ad7101d6458d7ded15a3f90f71e7c7
|
Provenance
The following attestation bundles were made for vision_calibration-0.3.0-cp310-abi3-win_amd64.whl:
Publisher:
release-pypi.yml on VitalyVorobyev/calibration-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vision_calibration-0.3.0-cp310-abi3-win_amd64.whl -
Subject digest:
2ee6b7c787052ff8f65ff3cc7f10a00ac439f4805e2c27ada4924ccaa67beb19 - Sigstore transparency entry: 1280955482
- Sigstore integration time:
-
Permalink:
VitalyVorobyev/calibration-rs@1796836963129e9d9bac85f521cc0d1cbabe68fd -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/VitalyVorobyev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@1796836963129e9d9bac85f521cc0d1cbabe68fd -
Trigger Event:
push
-
Statement type:
File details
Details for the file vision_calibration-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: vision_calibration-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
205afe72b043ab9be0ca844d75c3c16f843268543b02bbf478fde211d7ef9c77
|
|
| MD5 |
da8ca60b6a9fd1c4fa8eec844ffebecb
|
|
| BLAKE2b-256 |
ff1a6d250474d0f1272594ed7087fe49238850384533b3a2252ba72777a85980
|
Provenance
The following attestation bundles were made for vision_calibration-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release-pypi.yml on VitalyVorobyev/calibration-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vision_calibration-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
205afe72b043ab9be0ca844d75c3c16f843268543b02bbf478fde211d7ef9c77 - Sigstore transparency entry: 1280955467
- Sigstore integration time:
-
Permalink:
VitalyVorobyev/calibration-rs@1796836963129e9d9bac85f521cc0d1cbabe68fd -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/VitalyVorobyev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@1796836963129e9d9bac85f521cc0d1cbabe68fd -
Trigger Event:
push
-
Statement type:
File details
Details for the file vision_calibration-0.3.0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: vision_calibration-0.3.0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcf3202327814f20e00baf680173b744525b78061839ea1c8cd5d73e3a2e5723
|
|
| MD5 |
c23cc2e9d8f08938f7d950f5bdba2f23
|
|
| BLAKE2b-256 |
6157ffba806716ad78b6efe3d9a95b39aadca94bde685a6407ccf66b5f4be1c2
|
Provenance
The following attestation bundles were made for vision_calibration-0.3.0-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
release-pypi.yml on VitalyVorobyev/calibration-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vision_calibration-0.3.0-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
dcf3202327814f20e00baf680173b744525b78061839ea1c8cd5d73e3a2e5723 - Sigstore transparency entry: 1280955475
- Sigstore integration time:
-
Permalink:
VitalyVorobyev/calibration-rs@1796836963129e9d9bac85f521cc0d1cbabe68fd -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/VitalyVorobyev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@1796836963129e9d9bac85f521cc0d1cbabe68fd -
Trigger Event:
push
-
Statement type: