locus-core 0.1.2

A high-performance fiducial marker detector for robotics.
Documentation

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:

  1. Preprocessing: [threshold::ThresholdEngine] computes local tile statistics and performs adaptive binarization.
  2. Segmentation: [segmentation::label_components_threshold_model] identifies quad candidates using Union-Find.
  3. Extraction: [quad::extract_quads_with_config] traces contours and fits initial polygon candidates.
  4. Decoding: [Detector] samples bit grids and performs Hamming error correction via [strategy::DecodingStrategy].
  5. Pose Estimation: [pose::estimate_tag_pose] recovers 6-DOF transforms using IPPE or weighted LM.

Examples

use locus_core::{Detector, DetectorConfig, DetectOptions, TagFamily, ImageView};

// Create a detector with default settings
let mut detector = Detector::new();

// Create a view into your image data (zero-copy)
let pixels = vec![0u8; 640 * 480];
let img = ImageView::new(&pixels, 640, 480, 640).unwrap();

// Detect tags (default family: AprilTag 36h11)
let detections = detector.detect(&img);

for detection in detections {
    println!("Detected tag {} at {:?}", detection.id, detection.center);
}