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.3.tar.gz (222.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.3-cp310-abi3-win_amd64.whl (746.6 kB view details)

Uploaded CPython 3.10+Windows x86-64

calib_targets-0.5.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

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

calib_targets-0.5.3-cp310-abi3-macosx_11_0_arm64.whl (883.7 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for calib_targets-0.5.3.tar.gz
Algorithm Hash digest
SHA256 6d5eb90354a49370d98edc94df35a1fefc017cd61b6759101708595d22a0c041
MD5 ea3b4d9da6fe4a934cf4612a03cb3ce7
BLAKE2b-256 2967c9685fb75b1f3aea7bde6c76cc499579d8da0c0e6618dbeb7a6a3da043b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for calib_targets-0.5.3.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.3-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for calib_targets-0.5.3-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c8fcc646ec4aa33f8e4080e036ebc7bfe7df9a71aafb4ce01c8db481b20c6e0b
MD5 6cd6d6261146feec76febd8b116184a9
BLAKE2b-256 1b0d7e3c8537cc5df903120d338c05d3e494fff996292a81a91750b0ff916463

See more details on using hashes here.

Provenance

The following attestation bundles were made for calib_targets-0.5.3-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.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for calib_targets-0.5.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b59be365874fee322c8dafd09f7783520ad9e1b1e10ac36dd571ffced950a354
MD5 212603d2d5a591c2474043ddfaadac5a
BLAKE2b-256 cdd86eda081d93d020459478a824196bfdb0accee41d87fea3fdaa2519e7f0e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for calib_targets-0.5.3-cp310-abi3-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.

File details

Details for the file calib_targets-0.5.3-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for calib_targets-0.5.3-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a9b44f19a26b56d458bd7d345f9e5d003e56cbf05558f3ed838fa3776a444941
MD5 5d12ef67c5e3786be8ffafae4948fae5
BLAKE2b-256 9b4bba69de3763a49753619e5161104e10abb6cce1b2fe45e29fb560028f642c

See more details on using hashes here.

Provenance

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

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