Skip to main content

No project description provided

Project description

calib-targets Python bindings

These bindings expose a native-feeling Python API backed by Rust (PyO3 + maturin).

Build & develop

pip install maturin
maturin develop
python -c "import calib_targets as ct; print(ct.detect_chessboard)"

Public API

Top-level detectors return typed dataclasses:

  • detect_chessboard(image, *, chess_cfg=None, params=None) -> ChessboardDetectionResult | None
  • detect_charuco(image, *, chess_cfg=None, params) -> CharucoDetectionResult
  • detect_marker_board(image, *, chess_cfg=None, params=None) -> MarkerBoardDetectionResult | None
  • render_target_bundle(document) -> GeneratedTargetBundle
  • write_target_bundle(document, output_stem) -> WrittenTargetBundle

Configuration is typed-only (dataclasses):

  • ChessConfig, ChessCornerParams, CoarseToFineParams, PyramidParams
  • ChessboardParams, OrientationClusteringParams, GridGraphParams
  • CharucoBoardSpec, CharucoDetectorParams, ScanDecodeConfig
  • MarkerCircleSpec, MarkerBoardLayout, CircleScoreParams, CircleMatchParams, MarkerBoardParams
  • PageSize, PageSpec, RenderOptions, ChessboardTargetSpec, CharucoTargetSpec, MarkerBoardTargetSpec, PrintableTargetDocument

Enums and literals:

  • TargetKind, CirclePolarity, MarkerLayout
  • DictionaryName (Literal) and DICTIONARY_NAMES

Inputs

  • image must be a 2D numpy.ndarray with dtype=uint8.
  • chess_cfg must be ChessConfig | None.
  • params must be typed params dataclasses (or None where allowed).
  • Dict/mapping inputs are intentionally rejected in the new API.

Results and compatibility

Result models are dataclasses with attribute access and editor navigation. Every config/result model provides:

  • to_dict()
  • from_dict(...)

This is the compatibility path for JSON pipelines and legacy dict-based code.

Migration guide

Old usage New usage
detect_chessboard(img, params={"min_corners": 16}) detect_chessboard(img, params=ChessboardParams(min_corners=16))
detect_charuco(..., params={"board": {...}}) detect_charuco(..., params=CharucoDetectorParams(board=CharucoBoardSpec(...)))
result["detection"]["corners"] result.detection.corners
N/A result.to_dict() / ResultType.from_dict(...)

Examples

pip install pillow
python examples/detect_chessboard.py path/to/image.png
python examples/detect_charuco.py path/to/image.png
python examples/detect_marker_board.py path/to/image.png
python examples/generate_printable.py tmpdata/printable/charuco_a4

For the canonical printable-target JSON model, the repo-local CLI flow, and print-at-100%-scale guidance, see the workspace printable-target guide: https://vitalyvorobyev.github.io/calib-targets-rs/printable.html

Implementation note

The compiled module is internal (calib_targets._core). Public API stability is guaranteed only for top-level calib_targets exports.

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

calib_targets-0.5.0.tar.gz (220.2 kB view details)

Uploaded Source

Built Distributions

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

calib_targets-0.5.0-cp310-abi3-win_amd64.whl (741.3 kB view details)

Uploaded CPython 3.10+Windows x86-64

calib_targets-0.5.0-cp310-abi3-macosx_11_0_arm64.whl (877.8 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

calib_targets-0.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file calib_targets-0.5.0.tar.gz.

File metadata

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

File hashes

Hashes for calib_targets-0.5.0.tar.gz
Algorithm Hash digest
SHA256 84f3852bf473f30aed8365f8df9eb28d181494c8b20612c3a2a3903e20e0a55f
MD5 3f2d4d1c30ffb578ad36de4252cac5db
BLAKE2b-256 1f6cc4bbc5ac360b79cd9fa69adf2d51678658a08dd8428dbdad3b797e2b8feb

See more details on using hashes here.

Provenance

The following attestation bundles were made for calib_targets-0.5.0.tar.gz:

Publisher: release-pypi.yml on VitalyVorobyev/calib-targets-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 calib_targets-0.5.0-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for calib_targets-0.5.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f92006148627b69728b64273c3b1b440bb6a769cde9123bd312c6d7ed913feda
MD5 f7e125ebb24a9837e65a00dbaed805d4
BLAKE2b-256 9823b57063808e08a85377cbd98847a7bd2669b264067762f5fb823c60308afd

See more details on using hashes here.

Provenance

The following attestation bundles were made for calib_targets-0.5.0-cp310-abi3-win_amd64.whl:

Publisher: release-pypi.yml on VitalyVorobyev/calib-targets-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 calib_targets-0.5.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for calib_targets-0.5.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9da8ce37de6361ce284455dbad4be549b469098c95db5bf1e3b918d14201bf62
MD5 69a1771023472e58a713f02ebb342992
BLAKE2b-256 941ed12b18e95802f2824c3212d2f9577565dc796566e7700d3f256f0baed1fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for calib_targets-0.5.0-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release-pypi.yml on VitalyVorobyev/calib-targets-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 calib_targets-0.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for calib_targets-0.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1c58867ae91cbb56444da30374854f027b5ad6fd940f585af93b94c3cc19cd61
MD5 1574a17d407d3425250405cbc7be7497
BLAKE2b-256 5fb9bc6828f08ae92a33e2eab55ebbfa4f1d929d327eda9e597502e1b3a058ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for calib_targets-0.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release-pypi.yml on VitalyVorobyev/calib-targets-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