Skip to main content

Crate calib_targets_aruco

Crate calib_targets_aruco 

Source
Expand description

ArUco/AprilTag marker dictionaries and decoding utilities.

This crate focuses on:

  • embedded built-in dictionaries (compiled into the binary),
  • matching observed marker codes against those dictionaries,
  • decoding markers either from rectified grids or from per-cell image quads.

It does not perform quad detection. Instead, it expects a grid model (for example from calib-targets-chessboard) or explicit cell corners.

§Quickstart

use calib_targets_aruco::{builtins, scan_decode_markers, Matcher, ScanDecodeConfig};
use calib_targets_core::GrayImageView;

let dict = builtins::builtin_dictionary("DICT_4X4_50").expect("dict");
let matcher = Matcher::new(dict, 1);

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

let scan_cfg = ScanDecodeConfig::default();
let markers = scan_decode_markers(&view, 4, 4, 4.0, &scan_cfg, &matcher);
println!("markers: {}", markers.len());

Modules§

builtins
Embedded built-in dictionaries.

Structs§

ArucoScanConfig
Optional overrides for marker scanning and matching.
CellSamples
Rectified per-cell intensity samples suitable for custom match scoring.
Dictionary
A fixed ArUco/AprilTag-style dictionary.
MarkerCell
One square cell with its image-space corners.
MarkerDetection
One decoded marker detection.
Match
A dictionary match for an observed marker code.
Matcher
Matcher for a fixed dictionary.
ScanDecodeConfig
Decoder configuration for scanning markers.

Enums§

DictionaryError
Validation error returned by Dictionary::from_static_codes.

Functions§

decode_marker_in_cell
Decode a single marker from one square cell in image space.
rotate_code_u64
Rotate a code stored in row-major bits: idx = y * N + x.
sample_cell
Sample a rectified per-cell intensity grid from an image using a cell quad, without decoding any marker id.
scan_decode_markers
Scan all square cells (sx,sy) in 0..cells_x × 0..cells_y, read + decode markers.
scan_decode_markers_in_cells
Decode markers from explicit per-cell image quads.