Skip to main content

Print-ready calibration target generation (chessboards, circle grids, AprilTag, ArUco) with cairo-rendered PDF/SVG/PNG output.

Project description

fiducial-targets

CI PyPI License

Print-ready calibration target generation. A Python library that produces millimetre-accurate PDF, SVG, and PNG outputs for chessboards, circle grids, AprilTag, ArUco, and arbitrary mixes of the above — with a YAML sidecar describing the geometry detectors need.

pip install fiducial-targets

Imports live under the fiducial.targets namespace (the package ships as a subpackage of fiducial — see Relationship to fiducial below).

What ships in v0.0.1.dev1

  • Target composition — stack pattern groups and ad-hoc placements in the same target frame, in any mix.
  • Patterns:
    • checkerboard — boards of arbitrary size.
    • circles — symmetric / asymmetric grids, interleaved two-radius grids, WhyCon-style ring grids, concentric ring patterns, plain dots and solid discs.
    • apriltag — single markers and boards for nine families (tag16h5, tag25h9, tag36h10, tag36h11, tagCircle21h7, tagCircle49h12, tagCustom48h12, tagStandard41h12, tagStandard52h13). IDs assigned top-down to match calib.io and OpenCV-aruco conventions.
    • aruco — single markers and boards for the predefined OpenCV dictionaries.
    • centering_disk, origin_marker — CCC origin markers, solid-disc origins, four-sector centering disks.
  • Composites — chessboard + AprilTag (chessboard_apriltag) and chessboard + ArUco (chessboard_aruco) with markers inset in the white squares.
  • Standard footerTarget.add_standard_footer(title, parameters) places an axis-orientation reference plus title and parameter captions below the content extent, never overlapping ink.
  • CairoRenderer with three explicit methods: render_pdf, render_svg, render_png. Pure-cairo, mm-accurate via a single Context.scale.
  • YAML sidecar emitted next to every output, with bounding box, per-placement geometry, per-group keypoints, and footer metadata.
  • ISO 216 paper formats (A0–A6) with a landscape switch and a custom-size override.

Quick start

from pathlib import Path
from fiducial.targets import Target, PageSize, CairoRenderer
from fiducial.targets.patterns import checkerboard, circles

target = Target()
target.add(checkerboard.board(columns=7, rows=6, square_size=25.0))
target.add(circles.dot(center=(200.0, 50.0), radius=8.0))
target.add_standard_footer(
    title="Chess 7x6 + auxiliary dot",
    parameters=("square=25mm", "dot r=8mm"),
)

CairoRenderer().render_pdf(target, PageSize.named("A4"), Path("board.pdf"))

All length values are millimetres. Non-mm quantities carry an explicit suffix (_px, _pt).

Relationship to fiducial

fiducial-targets is the generator half of a two-package split. fiducial is the application- facing detection library — that's where production code lives and where the target-description data contract is owned. This package generates the printable targets fiducial consumes, with a YAML sidecar that documents the ground-truth layout.

Both packages converge at v0.1.0, at which point fiducial-targets will source its payload dataclasses from fiducial (no API change on either side; users continue to write from fiducial.targets import ...).

Status

Early development. The public surface is intentionally small while both packages stabilise toward the joint v0.1.0 cut. Expect minor imports to shift, but the surfaces named above are the ones intended to ship.

IP / attribution

All shipping code is original to this project. The .npz data tables under src/fiducial/targets/_codes/ are upstream code dictionaries:

Attribution is preserved in NOTICE.md files alongside each table.

Development

pip install -e ".[dev]"
ruff check .
ruff format --check .
pytest

License

Apache-2.0 — see LICENSE.

Copyright (c) 2026 Vistralis Labs.

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

fiducial_targets-0.0.1.dev1.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

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

fiducial_targets-0.0.1.dev1-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

Details for the file fiducial_targets-0.0.1.dev1.tar.gz.

File metadata

  • Download URL: fiducial_targets-0.0.1.dev1.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fiducial_targets-0.0.1.dev1.tar.gz
Algorithm Hash digest
SHA256 2ac2df0b9094eda5e784729e694424dcab1ab269ec506c14119b52ef4c392805
MD5 c6e8267fb2f0f1ec1b4fe8b186425d90
BLAKE2b-256 8ff5c3415ef02300ef106a58ca4272cb4e6bd2ff470a1ac68dd70ff6f196d4b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for fiducial_targets-0.0.1.dev1.tar.gz:

Publisher: release.yml on vistralis/fiducial-targets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fiducial_targets-0.0.1.dev1-py3-none-any.whl.

File metadata

File hashes

Hashes for fiducial_targets-0.0.1.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 a2d8f0c472c1039b1217c3112638a5d69670bfa69d48cfce133d09f42bde2434
MD5 a9dbc639e808126ada165d9492c6235b
BLAKE2b-256 2a6b4cb64bf3f339e78de868b9cb25edb9dc18c85ec7287df6f4bec1ac1106da

See more details on using hashes here.

Provenance

The following attestation bundles were made for fiducial_targets-0.0.1.dev1-py3-none-any.whl:

Publisher: release.yml on vistralis/fiducial-targets

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