Skip to main content

Crate calib_targets_charuco

Crate calib_targets_charuco 

Source
Expand description

ChArUco-related utilities.

Current focus:

  • chessboard detection from ChESS corners,
  • per-cell marker decoding (no full-image warp by default),
  • alignment to a known board definition and corner ID assignment.

Marker dictionaries and decoding live in calib-targets-aruco.

§Quickstart

use calib_targets_charuco::{
    builtins, CharucoBoardSpec, CharucoDetector, CharucoParams, GrayImageView,
    MarkerLayout,
};

let board = CharucoBoardSpec::new(5, 7, 1.0, 0.7, builtins::DICT_4X4_50)
    .with_marker_layout(MarkerLayout::OpenCvCharuco);

let params = CharucoParams::for_board(board);
let detector = CharucoDetector::new(params)?;

let pixels = vec![0u8; 32 * 32];
let view = GrayImageView {
    width: 32,
    height: 32,
    data: &pixels,
};

// `detect` runs the ChESS corner front-end from `params.chess` itself.
// Feed a corner cloud you already have to `detect_with_corners` instead.
let _ = detector.detect(&view)?;

Re-exports§

pub use link_check::LinkCheckMode;
pub use link_check::LinkViolation;
pub use link_check::LinkViolationKind;

Modules§

builtins
Embedded built-in dictionaries.
diagnostics
Opt-in diagnostics surface for the ChArUco detector.
link_check
Marker-to-corner linkage validation for ChArUco detections.

Structs§

CharucoAdvancedTuning
Advanced, unstable tuning knobs for the ChArUco detector.
CharucoBoard
Precomputed board mapping helpers.
CharucoBoardSpec
Static ChArUco board specification.
CharucoCorner
A labelled ChArUco inner corner.
CharucoDetection
Output of a ChArUco detection run.
CharucoDetector
Grid-first ChArUco detector.
CharucoParams
Configuration for the ChArUco detector.
ChessCorner
Canonical 2D corner consumed by the chessboard detector.
Dictionary
A fixed ArUco/AprilTag-style dictionary.
GrayImageView
Borrowed view over an 8-bit grayscale image.
GridTransform
An affine integer lattice-coordinate transform: destination = matrix * source + translation.

Enums§

BoardSpecLoadError
Errors from loading a board specification via load_board_spec_any.
CharucoBoardError
Board specification validation errors.
CharucoDetectError
Errors returned by the ChArUco detector.
MarkerLayout
Marker placement scheme for the board.

Functions§

load_board_spec_any
Load a CharucoBoardSpec from JSON accepting either the flat board.json layout ({"ncols": ..., "dict": "..."}) or the nested config.json layout ({"target": {"ncols": ..., "dict": "..."}}).
resolve_dictionary
Resolve a dictionary name tolerating both the prefixed (DICT_4X4_1000) and un-prefixed (4X4_1000, APRILTAG_36h10) spellings used in different tooling JSON files.

Type Aliases§

GridAlignment
Semantic alias for a transform that maps detected grid coordinates into a board/model coordinate frame.