Skip to content

Add support for ArUco 7x7 tag family#1835

Merged
fspindle merged 1 commit intolagadic:masterfrom
s-trinh:feat_ArUco_7x7_support
Nov 25, 2025
Merged

Add support for ArUco 7x7 tag family#1835
fspindle merged 1 commit intolagadic:masterfrom
s-trinh:feat_ArUco_7x7_support

Conversation

@s-trinh
Copy link
Copy Markdown
Contributor

@s-trinh s-trinh commented Nov 24, 2025

ArUco 7x7 have bigger Hamming distance between two codes and the id decoding should be more reliable.

Support for ArUco 4x4, 5x5 and 6x6 was much easier since we can use tag16h5, tag25h7, tag36h11 as a starting point.

For ArUco 7x7 support

"bit-pattern"

First compute the correct "bit-pattern" for the considered family, see: tf->bit_x / tf->bit_y

With fiducial marker detection, it goes roughly as "quad_rectangle extraction" --> "perspective correction using estimated homography" --> "pattern decoding".

In OpenCV, one tag id is stored using 4 values to cover the 4 orientations: https://github.com/opencv/opencv/blob/3c3596c6efcabd0e5ee021e2048a30ec38a8d4e1/modules/objdetect/src/aruco/predefined_dictionaries.hpp#L21-L25

With the AprilTag library, some kind of bitwise operations are used to cover the 4 tag orientations, saving some memory at the cost of extra cpu work.

image

For a 5x5 family, the previous image shows the tf->bit_x / tf->bit_y values to extract the tag pattern into a full codedata such that using bitwise operations it is possible to cover the 4 tag orientations. More information here.

Codedata

Once the tf->bit_x / tf->bit_y values are computed for a 7x7 family, corresponding codedata need to be filled, using:

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 25, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.87%. Comparing base (448c2f2) to head (0528629).
⚠️ Report is 64 commits behind head on master.

Files with missing lines Patch % Lines
modules/detection/src/tag/vpDetectorAprilTag.cpp 66.66% 8 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1835      +/-   ##
==========================================
- Coverage   47.93%   47.87%   -0.06%     
==========================================
  Files         531      531              
  Lines       68822    68870      +48     
  Branches    32157    32169      +12     
==========================================
- Hits        32988    32973      -15     
+ Misses      31833    25399    -6434     
- Partials     4001    10498    +6497     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fspindle
Copy link
Copy Markdown
Contributor

@s-trinh Thanks. Very nice feature.

@fspindle fspindle merged commit 25c2348 into lagadic:master Nov 25, 2025
87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants