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§
- Grid
Alignment - A grid alignment:
dst = transform(src) + translation. - Grid
Transform - Integer 2D grid transform (a 2×2 matrix) for aligning detected grids to a board model.
- Puzzle
Board Decode Config - Tuning parameters for the decoding stage.
- Puzzle
Board Decode Info - Per-decode diagnostics.
- Puzzle
Board Detect Config - Top-level detector config read from JSON.
- Puzzle
Board Detect Report - End-to-end report for one detection run.
- Puzzle
Board Detection Result - Full result of a PuzzleBoard detection call.
- Puzzle
Board Detector - Owned PuzzleBoard detector.
- Puzzle
Board Params - Configuration for the PuzzleBoard detector.
- Puzzle
Board Spec - Specification of a printable PuzzleBoard.
Enums§
- Puzzle
Board Detect Error - Errors returned by the PuzzleBoard detector.
- Puzzle
Board IoError - Errors from PuzzleBoard JSON I/O.
- Puzzle
Board Scoring Mode - Scoring function used when ranking candidate
(D4, origin)hypotheses. - Puzzle
Board Search Mode - Strategy for recovering the master-map origin during decode.
- Puzzle
Board Spec Error - Errors returned by
PuzzleBoardSpec::new.
Constants§
- GRID_
TRANSFORMS_ D4 - The 8 dihedral transforms
D4on the integer grid. - MASTER_
COLS - Number of columns in the master PuzzleBoard pattern.
- MASTER_
ROWS - Number of rows in the master PuzzleBoard pattern.