Skip to content
barcoder

Standards/stag

STag

TypeFiducial Marker
Completeness81%high

Overview

STag is a square fiducial marker system built for stable pose estimation: it aims to cut the frame-to-frame jitter that imaging noise and small lighting changes cause in a camera's estimated pose 1. Each marker has an outer square border, used to detect the marker and estimate a homography, and an inner circular border, used to refine that homography 1. Inside the circle sit 48 bits that identify the marker within a chosen library 2. Like ArUco and AprilTag, it carries an ID, not a data payload.

History

STag was designed by Burak Benligiray, Cihan Topal and Cüneyt Akınlar 1. Istanbul Technical University's research portal lists the authors' affiliations as Eskişehir Technical University and Osmangazi University 3.

  • 19 July 2017: the paper "STag: A Stable Fiducial Marker System" is posted to arXiv (1707.06292) 1. The reference repository bbenligiray/stag was created the same day 4.
  • 1 July 2019: a revised version 2 is posted, marked "Accepted to be published in Image and Vision Computing" 12.
  • September 2019: the paper appears in Image and Vision Computing, vol. 89, pp. 158–169 (doi 10.1016/j.imavis.2019.06.007) 3. The portal shows 76 Scopus citations 3.
  • 26 March 2021: a Journal of Intelligent & Robotic Systems survey compares STag with ARTag, AprilTag and ArUco, calling the four "the state-of-the-art and most widely used packages" 10.
  • December 2023: the original authors' repository says it is no longer actively maintained and points users to an updated fork with a Python package 45.

Technical specification

Marker design. The paper argues that a circle can be localized more stably than a quadrilateral under noise. In its simulation the fitted ellipse had lower localization error than the quad at every noise level tested 2. A single conic is not enough to recover pose, so the design pairs the circle with an outer square border. The square gives detection and a rough homography; the circle then refines it 2.

Encoding area. The disk inside the circle holds 48 disk-shaped bit cells, packed by simulated annealing 2. The code pattern is then dilated and eroded repeatedly. This fills the gaps between neighbouring bits, so the code still reads after slight localization errors. It also cuts the number of edges the detector finds, and makes the marker more robust against blooming and reflections on glossy paper 2.

Libraries. The codes are lexicographic codes (lexicodes), a method first used for markers by AprilTag. Each new codeword must keep a minimum Hamming distance (HD) from earlier codewords and from their circular permutations, so a rotated marker isn't read as another ID 2. An exhaustive search over 48-bit space was too slow even on a GPU. The authors therefore generated 12-bit codewords first and built the 48-bit codewords as 4-combinations of them 2. The published libraries are 25:

Library HD11 HD13 HD15 HD17 HD19 HD21 HD23
Markers 22,309 2,884 766 157 38 12 6
Correctable bits 5 6 7 8 9 11 13

A larger library gives more IDs; a larger HD tolerates more bit errors. The detector reads only the library it is configured with 5.

Detection pipeline. The detector 2:

  1. Extracts edge segments with the parameter-free EDPF (Edge Drawing) algorithm.
  2. Fits lines with EDLines and finds quadrilateral candidates.
  3. Rejects candidates whose perspective distortion is too large to be a real marker.
  4. Decodes and validates the candidate against the library.
  5. Localizes the ellipse and refines the homography.

Homography refinement. Starting from the corner-based homography, STag minimises the deviation of the back-projected ellipse from the expected circle using the Nelder–Mead method 2. The authors describe this use of a single conic correspondence, without extra constraints such as a point, as unique in the literature 2.

Running time. On a 1280×720 image of a cluttered scene with one marker, the steps took 22.6 ms (EDPF), 1.0 (EDLines), 0.7 (candidate detection), 0.6 (validation), 1.1 (ellipse localization) and 0.8 (refinement): 26.8 ms in total, with EDPF over 80% of it 2.

Use cases

  • Robot localization. The 2021 survey frames fiducial markers as a way to add to, or replace, GNSS, visual-inertial odometry and SLAM when those are unavailable or not accurate enough, and benchmarks STag for that role 10.
  • AR/VR and mixed reality. The STag paper says jitter breaks immersion in AR/VR more than a constant misalignment does, and makes control loops oscillate 2.
  • ROS robots. Two ROS wrappers exist. The University of South Carolina's Unmanned Systems & Robotics Lab package supports ROS Kinetic, Melodic and Noetic 8. Dartmouth's Reality and Robotics Lab published the other 9.
  • Occlusion-tolerant AR markers. A 2023 Leiden (LIACS) bachelor thesis singles out STag as the "biggest break-through when it comes to occlusion" among fiducial markers. Its own variant, STag2, did not consistently improve occlusion resilience 11.

Implementations

Each implementation below is a detector. The marker images are generated by reference code in the repositories (ref/marker generator) or downloaded as ready-made libraries 45.

  • bbenligiray/stag (C, 230 stars, last push Dec 2023): the authors' code from the paper. It is no longer actively maintained 4.
  • ManfredStoiber/stag (C, MIT licence, 49 stars, last push Jun 2025): an updated fork on OpenCV 4. It describes STag as "stable, occlusion-resistant" and exposes stag::detectMarkers(image, libraryHD, …) 5.
  • ManfredStoiber/stag-python (Python, 36 stars, last push Jun 2025): Python bindings, published on PyPI as stag-python. The first release, 1.0.0, came out on 13 December 2023 and the latest, 1.1.1, on 5 June 2025 67.
  • usrl-uofsc/stag_ros (C, 48 stars, last push May 2024): a ROS package, developed independently of STag's creators 8.
  • dartmouthrobotics/stag_ros (C++, MIT licence, 8 stars, last push Jan 2021): a ROS node wrapper 9.

Fun facts

  • In the angle test, STag missed just 4 of 1,000 frames at 80°, where ArUco missed 416. Both failed every frame at 85° 2.
  • RUNE-Tag's largest library, Rune-129, uses 129 dots and holds 17,000 markers. STag's densest library fits 22,309 IDs into 48 bits 2.

Comparison

The STag paper benchmarks four marker systems: ARToolKit+, ArUco, RUNE-Tag and STag 2.

  • False positives. On the Indoor Scene Recognition dataset, STag HD11 had 7 false positives among 57,893 candidates 2. ArUco ran on 317,741 candidates. Its false positives ranged from 2,349 for the 4×4_50 dictionary down to 2–112 for the 7×7 dictionaries (7×7_50: 27; 7×7_250: 112) 2. The authors' "validation failure probability" removes the effect of library size and error correction. On that metric STag HD11 scores 1.7×10⁻¹⁰, against 7.4×10⁻⁵ for ArUco 4×4_50 and 2.0×10⁻¹⁰ for ArUco 7×7_1000 2.
  • Viewing angle. ARToolKit+ could not detect markers at 70° or more. RUNE-Tag began failing from 20° and failed every frame from 40° 2.
  • Viewing distance. RUNE-Tag was not detected at 125 cm or beyond, because its dots become too small. The three border-based systems were detected at every distance tested, up to 300 cm 2.
  • Speed (single core, 1280×720, one marker): ARToolKit+ 2.6 ms, ArUco 10.0 ms, STag 18.1 ms and RUNE-Tag 579.9 ms 2.
  • Trade-off. The authors conclude STag is "significantly more stable than ArUco" and an order of magnitude faster than RUNE-Tag. They add that it is somewhat more prone to pose ambiguity than ARToolKit+ 2.

Choose STag over ArUco or AprilTag when steady pose matters more than raw speed, as in AR overlays or visual servoing. Choose ArUco or ARToolKit Marker when per-frame time is the constraint 2.

Status

Active open source, maintained as a community fork. The original repository has been unmaintained since 2023 and points to the ManfredStoiber fork 4. That fork and its Python package were last updated in June 2025 567. STag remains one of the four markers benchmarked in the 2021 robotics survey 10. No standards body publishes it; the paper and the code are the specification 24.

Sources

Deployments

No country reports mention this standard by name.

Regions / aggregations not mapped to a single country

  • Universal
source · content/standards/stag/index.md