bbenligiray / stag

STag: A Stable Fiducial Marker System
MIT License
183 stars 52 forks source link

Inverted markers #18

Open MoffKalast opened 2 years ago

MoffKalast commented 2 years ago

Just wondering, how viable would it be to invert the marker colours in terms of detection? Right now the markers are set up to be a large square of black with a little white in the middle which is not exactly optimal in terms of printer cartridges.

I suppose it would take a major refactor to even try and check if the detection quality is comparable with an inverted colour scheme, but I'm just interested if this was ever considered or tried.

bbenligiray commented 2 years ago

Most markers are designed with a white outer border, a black inner border and the coding inside this inner border (because we don't want to care about what the color of the surface that the marker will be placed on). So my point is that the largest component of the marker is light, the second largest component is dark, and the rest is mixed.

The detection algorithm for STag is designed to only detect darker quads contained within a lighter border (because that eliminates half of the non-marker candidates, and can be expected to halve the number of false positives). There are two ways to detect markers with inverted colors