First off, thank you for releasing this code base. I'm evaluating using STags for a mobile robot application where the stability of the reading from the tags is extremely important.
Would you be open to adding configuration for a mapping of tag id to tag size? If so, I'd be happy to look into doing that. Insight into the places that need to be changed in the code would help that go faster.
When the marker is successfully decoded, the array of decoded markers will usually contain four duplicate readings for the same tag which I'm sure has performance implications. For example, in this frame the marker is decoded four times (the array markers on the Stag
object has four markers in it here https://github.com/dartmouthrobotics/stag/blob/master/src/Stag.cpp#L50). I would guess that this is coming from the quad detector and that adding a simple step which filters out duplicate quads based on the sum of the distances between their corners or something would fix this. Output from that frame:
~~~~~~~~~~~~~~~~~
Marker 1 num marker 4
Center [970.951, 268.624]
Translation: [-0.5426630776763407;
-1.027159407186172;
2.694480358554943]
Rotation: [-0.0444761597568246;
0.1080291508322071;
0.01037789328024481]
Marker 1 num marker 4
Center [970.955, 268.627]
Translation: [-0.5433152177014651;
-1.026926771242593;
2.693072105601706]
Rotation: [-0.04121157508080839;
0.1051655381738611;
0.009573907338546446]
Marker 1 num marker 4
Center [970.951, 268.624]
Translation: [-0.5426630776763407;
-1.027159407186172;
2.694480358554943]
Rotation: [-0.0444761597568246;
0.1080291508322071;
0.01037789328024481]
Marker 1 num marker 4
Center [970.955, 268.627]
Translation: [-0.5433152177014651;
-1.026926771242593;
2.693072105601706]
Rotation: [-0.04121157508080839;
0.1051655381738611;
0.009573907338546446]