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§
- Aruco
Scan Config - Optional overrides for marker scanning and matching.
- Cell
Samples - Rectified per-cell intensity samples suitable for custom match scoring.
- Dictionary
- A fixed ArUco/AprilTag-style dictionary.
- Marker
Cell - One square cell with its image-space corners.
- Marker
Detection - One decoded marker detection.
- Match
- A dictionary match for an observed marker code.
- Matcher
- Matcher for a fixed dictionary.
- Scan
Decode Config - Decoder configuration for scanning markers.
Enums§
- Dictionary
Error - 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)in0..cells_x × 0..cells_y, read + decode markers. - scan_
decode_ markers_ in_ cells - Decode markers from explicit per-cell image quads.