High-performance AprilTag and ArUco detection engine.
Locus is a research-oriented, memory-safe fiducial marker detector targeting low latency. It provides a performance-focused pipeline for robotics and computer vision, with strict zero-heap allocation in the detection hot-path.
Key Features
- Performance: SIMD-accelerated adaptive thresholding and connected components.
- Accuracy: Advanced sub-pixel refinement and probabilistic pose estimation.
- Flexibility: Pluggable tag families (AprilTag 36h11, 16h5, ArUco).
- Memory Safety: Arena-based memory management ([
bumpalo]).
Architecture
The pipeline is designed around Data-Oriented Design (DOD) principles:
- Preprocessing: [
threshold::ThresholdEngine] computes local tile statistics and performs adaptive binarization. - Segmentation: [
segmentation::label_components_threshold_model] identifies quad candidates using Union-Find. - Extraction: [
quad::extract_quads_with_config] traces contours and fits initial polygon candidates. - Decoding: [
Detector] samples bit grids and performs Hamming error correction via [strategy::DecodingStrategy]. - Pose Estimation: [
pose::estimate_tag_pose] recovers 6-DOF transforms using IPPE or weighted LM.
Examples
use ;
// Create a detector with default settings
let mut detector = new;
// Create a view into your image data (zero-copy)
let pixels = vec!;
let img = new.unwrap;
// Detect tags (default family: AprilTag 36h11)
let detections = detector.detect;
for detection in detections