Skip to main content

Crate calib_targets_puzzleboard

Crate calib_targets_puzzleboard 

Source
Expand description

PuzzleBoard calibration target detector.

The PuzzleBoard is a self-identifying chessboard target introduced by Stelldinger (2024, arXiv:2409.20127): a standard checkerboard with a small binary dot placed at the midpoint of every interior edge. The dot pattern is designed so that any locally observed fragment of the board (≥ 4 × 4 squares) uniquely identifies its absolute position on a master 501 × 501 pattern — giving every detected chessboard corner an absolute (I, J) label, with graceful degradation under occlusion, perspective distortion, and low pixel-per-edge ratios.

Encoding is the superposition of two cyclic binary sub-perfect maps:

  • A: shape (3, 167) with window (3, 3)₂ — one bit per horizontal edge
  • B: shape (167, 3) with window (3, 3)₂ — one bit per vertical edge

The maps are generated once (see tools/generate_code_maps.rs) and shipped as embedded bytes (src/data/map_a.bin / map_b.bin). All runtime lookups go through code_maps.

§Quickstart

use calib_targets_puzzleboard::{
    PuzzleBoardDetector, PuzzleBoardParams, PuzzleBoardSpec,
};

let spec = PuzzleBoardSpec::new(12, 12, 1.0)?;
let params = PuzzleBoardParams::for_board(&spec);
let detector = PuzzleBoardDetector::new(params)?;
// Feed a real greyscale image and raw ChESS corners to `detector.detect(…)`.
// See `examples/detect_puzzleboard.rs` for a working end-to-end example.

Re-exports§

pub use code_maps::PuzzleBoardObservedEdge;
pub use code_maps::EDGE_MAP_A_COLS;
pub use code_maps::EDGE_MAP_A_ROWS;
pub use code_maps::EDGE_MAP_B_COLS;
pub use code_maps::EDGE_MAP_B_ROWS;

Modules§

code_maps
Embedded code maps and lookup helpers.

Structs§

GridAlignment
A grid alignment: dst = transform(src) + translation.
GridTransform
Integer 2D grid transform (a 2×2 matrix) for aligning detected grids to a board model.
PuzzleBoardDecodeConfig
Tuning parameters for the decoding stage.
PuzzleBoardDecodeInfo
Per-decode diagnostics.
PuzzleBoardDetectConfig
Top-level detector config read from JSON.
PuzzleBoardDetectReport
End-to-end report for one detection run.
PuzzleBoardDetectionResult
Full result of a PuzzleBoard detection call.
PuzzleBoardDetector
Owned PuzzleBoard detector.
PuzzleBoardParams
Configuration for the PuzzleBoard detector.
PuzzleBoardSpec
Specification of a printable PuzzleBoard.

Enums§

PuzzleBoardDetectError
Errors returned by the PuzzleBoard detector.
PuzzleBoardIoError
Errors from PuzzleBoard JSON I/O.
PuzzleBoardScoringMode
Scoring function used when ranking candidate (D4, origin) hypotheses.
PuzzleBoardSearchMode
Strategy for recovering the master-map origin during decode.
PuzzleBoardSpecError
Errors returned by PuzzleBoardSpec::new.

Constants§

GRID_TRANSFORMS_D4
The 8 dihedral transforms D4 on the integer grid.
MASTER_COLS
Number of columns in the master PuzzleBoard pattern.
MASTER_ROWS
Number of rows in the master PuzzleBoard pattern.