No project description provided
Project description
calib-targets Python bindings
This repo ships Python bindings for the high-level calib-targets facade crate.
Build & develop
pip install maturin
maturin develop
python -c "import calib_targets; print(calib_targets)"
API
The module name is calib_targets and it exposes three functions:
detect_chessboard(image, *, chess_cfg=None, params=None) -> dict | Nonedetect_charuco(image, *, chess_cfg=None, params) -> dictdetect_marker_board(image, *, chess_cfg=None, params=None) -> dict | None
Inputs and config:
imagemust be a 2Dnumpy.ndarraywithdtype=uint8(grayscale).chess_cfgacceptsNone, a dict of overrides, or aChessConfiginstance.paramsacceptsNone, a dict of overrides, or typed params classes.detect_charucorequiresparamsand the board lives inparams.board(orparams["board"]for dict overrides).
Notes:
- Typed config classes exposed by the module include
ChessConfig,ChessCornerParams,CoarseToFineParams,PyramidParams,ChessboardParams,OrientationClusteringParams,GridGraphParams,CharucoDetectorParams,ScanDecodeConfig,MarkerBoardParams,CircleScoreParams,CircleMatchParams,CharucoBoardSpec,MarkerBoardLayout, andMarkerCircleSpec. - Dict overrides can be partial; unknown keys raise
ValueErrorlisting valid keys. target_positionis populated only when the board layout includes a validcell_sizeand alignment succeeds. For marker boards, setparams.layout.cell_sizeorparams["layout"]["cell_size"].- Typed config objects expose mutable attributes (set fields directly in Python).
Output schema (authoritative)
All outputs are JSON-compatible dicts/lists with basic Python types.
Common shapes:
Point2:[x, y](floats).GridCoords:{"i": int, "j": int}.TargetDetection:kind:"chessboard" | "charuco" | "checkerboard_marker".corners: list ofLabeledCorner.
LabeledCorner:position:Point2.grid:GridCoords | None.id:int | None.target_position:Point2 | None.score:float.
detect_chessboard(...) -> None | dict:
detection:TargetDetection.inliers:list[int](indices intodetection.corners).orientations:[float, float] | None.debug:orientation_histogram:{"bin_centers": list[float], "values": list[float]} | None.graph:{"nodes": list[{"position": Point2, "neighbors": list[{"index": int, "direction": str, "distance": float}]}]} | None.
detect_charuco(...) -> dict:
detection:TargetDetection.markers: list ofMarkerDetection.alignment:GridAlignment.
MarkerDetection:
id:int.gc:{"gx": int, "gy": int}.rotation:int.hamming:int.score:float.border_score:float.code:int(packed marker bits).inverted:bool.corners_rect:[Point2, Point2, Point2, Point2](TL, TR, BR, BL).corners_img:[Point2, Point2, Point2, Point2] | None(TL, TR, BR, BL).
GridAlignment:
transform:{"a": int, "b": int, "c": int, "d": int}.translation:[int, int].
detect_marker_board(...) -> None | dict:
detection:TargetDetection.inliers:list[int].circle_candidates: list ofCircleCandidate.circle_matches: list ofCircleMatch.alignment:GridAlignment | None.alignment_inliers:int.
CircleCandidate:
center_img:Point2.cell:GridCoords.polarity:"white" | "black".score:float.contrast:float.
CircleMatch:
expected:MarkerCircleSpec.matched_index:int | None.distance_cells:float | None.offset_cells:{"di": int, "dj": int} | None.
MarkerCircleSpec:
cell:GridCoords.polarity:"white" | "black".
Examples
The example scripts load an image with Pillow (install it once):
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
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 calib_targets-0.2.2.tar.gz.
File metadata
- Download URL: calib_targets-0.2.2.tar.gz
- Upload date:
- Size: 152.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd43edfc1eb3a1473940c9482027abd68648abbf14bb16e2dc5602209aab8490
|
|
| MD5 |
f9ea76d984090bab7f7fe351331ff833
|
|
| BLAKE2b-256 |
68999714b8834fbca22a96f69e4bbd7437a73c0820facb790646a6d135a9e159
|
Provenance
The following attestation bundles were made for calib_targets-0.2.2.tar.gz:
Publisher:
release-pypi.yml on VitalyVorobyev/calib-targets-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
calib_targets-0.2.2.tar.gz -
Subject digest:
dd43edfc1eb3a1473940c9482027abd68648abbf14bb16e2dc5602209aab8490 - Sigstore transparency entry: 789742633
- Sigstore integration time:
-
Permalink:
VitalyVorobyev/calib-targets-rs@c13b6776b14f4dfcd90eede58649b655661aea3d -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/VitalyVorobyev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@c13b6776b14f4dfcd90eede58649b655661aea3d -
Trigger Event:
push
-
Statement type:
File details
Details for the file calib_targets-0.2.2-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: calib_targets-0.2.2-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 584.5 kB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32eedcd661db4d9d6fc9b37c4a8b04f53164234547e062dc8975a32d9d26c56e
|
|
| MD5 |
0c197ab9e87e0a2c45e4783db4245b9b
|
|
| BLAKE2b-256 |
31839a989ed39b8f1643d8c4ecd9c1275a412e6d1ac1a399484c0fc39d3cbedb
|
Provenance
The following attestation bundles were made for calib_targets-0.2.2-cp310-abi3-win_amd64.whl:
Publisher:
release-pypi.yml on VitalyVorobyev/calib-targets-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
calib_targets-0.2.2-cp310-abi3-win_amd64.whl -
Subject digest:
32eedcd661db4d9d6fc9b37c4a8b04f53164234547e062dc8975a32d9d26c56e - Sigstore transparency entry: 789742648
- Sigstore integration time:
-
Permalink:
VitalyVorobyev/calib-targets-rs@c13b6776b14f4dfcd90eede58649b655661aea3d -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/VitalyVorobyev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@c13b6776b14f4dfcd90eede58649b655661aea3d -
Trigger Event:
push
-
Statement type:
File details
Details for the file calib_targets-0.2.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: calib_targets-0.2.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 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.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da2b741eaf612c2bf3e95b8f794c3c69aca91a44a37f58300b19cb57be4f7a6b
|
|
| MD5 |
4157d32485a9e2bbd9edcd214de17026
|
|
| BLAKE2b-256 |
54a5df300291aad2983ec63688ed28dac7c4916efd54bf2ec7f69ac2eb762555
|
Provenance
The following attestation bundles were made for calib_targets-0.2.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release-pypi.yml on VitalyVorobyev/calib-targets-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
calib_targets-0.2.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
da2b741eaf612c2bf3e95b8f794c3c69aca91a44a37f58300b19cb57be4f7a6b - Sigstore transparency entry: 789742652
- Sigstore integration time:
-
Permalink:
VitalyVorobyev/calib-targets-rs@c13b6776b14f4dfcd90eede58649b655661aea3d -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/VitalyVorobyev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@c13b6776b14f4dfcd90eede58649b655661aea3d -
Trigger Event:
push
-
Statement type:
File details
Details for the file calib_targets-0.2.2-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: calib_targets-0.2.2-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 724.1 kB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98bed5bcc6d2077a9f1166c5646cd945471ada079e8974b89330c6765d16b1a2
|
|
| MD5 |
9653804a1c7ba090d2ada42bb37b7e6c
|
|
| BLAKE2b-256 |
b71ec81834b9dda0a1aeba84645ed653260f9046e94f13cc1a29309dac969763
|
Provenance
The following attestation bundles were made for calib_targets-0.2.2-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
release-pypi.yml on VitalyVorobyev/calib-targets-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
calib_targets-0.2.2-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
98bed5bcc6d2077a9f1166c5646cd945471ada079e8974b89330c6765d16b1a2 - Sigstore transparency entry: 789742643
- Sigstore integration time:
-
Permalink:
VitalyVorobyev/calib-targets-rs@c13b6776b14f4dfcd90eede58649b655661aea3d -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/VitalyVorobyev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@c13b6776b14f4dfcd90eede58649b655661aea3d -
Trigger Event:
push
-
Statement type: