Crate calib_targets

Crate calib_targets 

Source
Expand description

High-level facade crate for the calib-targets-* workspace.

This crate provides:

  • stable, convenient re-exports of the underlying detector crates
  • (feature-gated) end-to-end helpers that run a ChESS corner detector (chess-corners) and then run a target detector on an image or raw buffer.

§Quickstart

use calib_targets::detect;
use calib_targets::chessboard::ChessboardParams;
use image::ImageReader;

let img = ImageReader::open("board.png")?.decode()?.to_luma8();
let chess_cfg = detect::default_chess_config();
let params = ChessboardParams::default();

let result = detect::detect_chessboard(&img, &chess_cfg, params);
println!("detected: {}", result.is_some());

§Python bindings

Python bindings live in crates/calib-targets-py and expose the calib_targets module. See crates/calib-targets-py/README.md in the repository for setup and the detect_* APIs. Config inputs accept typed Python classes or dict overrides; detect_charuco requires params with params.board. For marker boards, target_position is populated only when params.layout.cell_size (or params["layout"]["cell_size"]) is provided and alignment succeeds.

§API map

  • calib_targets::core: core types (corners, grids, homographies, images).
  • calib_targets::chessboard: chessboard detection from ChESS corners.
  • calib_targets::aruco: ArUco/AprilTag dictionaries and marker decoding.
  • calib_targets::charuco: ChArUco board alignment and IDs.
  • calib_targets::marker: checkerboard + circle marker boards.
  • calib_targets::detect (feature image): end-to-end helpers from image::GrayImage.

§Performance

Benchmarks are coming. The goal is to be the fastest detector in this class while maintaining high sensitivity and accuracy.

Re-exports§

pub use calib_targets_aruco as aruco;
pub use calib_targets_charuco as charuco;
pub use calib_targets_chessboard as chessboard;
pub use calib_targets_core as core;
pub use calib_targets_marker as marker;

Modules§

detect

Structs§

ChessboardParams
Parameters specific to the chessboard detector.
Corner
Canonical 2D corner used by all target detectors.
GridCoords
Integer grid coordinates (i, j) in board space.
LabeledCorner
A corner that is part of a detected target, with optional ID info.
TargetDetection
One detected target (board instance) in an image.

Enums§

TargetKind
The kind of target that a detection corresponds to.