13

I want to use ArUco markers to detect objects and use a predefined dictionary.

I only need a small amount of different markers. About 10. I am now wondering what the advantages and disadvantages are between the different predefined dictionaries.

Dictionaries differ in amount of markers and bit size.

My thoughts so far:

  • Having a lower amount of markers decreases the inter marker distance, thus the chance of faulty marker ID classification. However, the maximum amount of available unique markers is lower.

  • Having a lower bit size helps to identify the markers better if their pixel size in the captured image is small (marker are printed small / far away in image). However, the maximum amount of available unique markers is lower.

Is my thought process so far correct? Did I miss anything?

So for me, only needing 10 different markers, I probably should stick to the DICT_4X4_50 dictionary to achieve best marker detection results?!

Or would it even be better to create my own dictionary with even less markers to increase inter marker distance?

Incanus
  • 389
  • 1
  • 4
  • 16
  • I would think this question should be answered in the documentation of the library you want to use ... – Patrick Artner Apr 28 '18 at 11:41
  • 2
    It is not provided in the openCV documentation. I just tried to use my common sense. Pupil Labs uses 3x3 bits marker, stating "The 5x5 grid allows us to make smaller markers that can still be detected.". See [here](https://docs.pupil-labs.com/#surface-tracking). – Incanus Apr 28 '18 at 11:53
  • If in doubt, try it out. - you can always perfromance-/benchmarktest different sizes :) luck to you. Do not despair if the question gets close-voted, it is kinda opinionated which is one of the "flag for close" reasons. – Patrick Artner Apr 28 '18 at 12:07
  • 1
    This is addressed in the [latest OpenCV documentation](https://docs.opencv.org/trunk/d5/dae/tutorial_aruco_detection.html) (section "Selecting a dictionary"). It basically confirms your thoughts. – luator Feb 13 '20 at 10:51

2 Answers2

18

I am the main ArUco developer. I personally recommend the first 10 markers of the ARUCO_MIP_36h12 dictionary. Unless you are working at an extremely low resolution, there is no real improvement in working with small markers such as 4x4 or 3x3. This is because internally the library reduces the detected marker to a small size (of around 50x50 bits regardless its dimensions in the actual image) and it is in this resolution in which the code is analyzed.

The fully explained pipeline of the ArUco library is described in the latest paper https://www.researchgate.net/publication/325787310_Speeded_Up_Detection_of_Squared_Fiducial_Markers in Sect 3.2. Also, you can have more information in the documentation at https://docs.google.com/document/d/1QU9KoBtjSM2kF6ITOjQ76xqL7H0TEtXriJX5kwi9Kgc

  • 6
    how can we use that dictionary? aruco.DICT_ARUCO_MIP_36h12 or simply aruco.ARUCO_MIP_36h12 don't seem to exist. Thanks! – LGenzelis Oct 25 '18 at 17:35
  • @Rafael I'm wondering about the fact, that I got a 7x7_1000 code of 29 detected as such, regardless of whether the center rectangle was black or white. Does this sound logical? – decades Apr 17 '22 at 17:18
2

Complementing Rafael's answer, on the bit size, with the relevant quote in the docs:

Markers are comprised by an external black border and an inner region that encodes a binary pattern. The binary pattern is unique an identifies each marker. Depending on the dictionary, there are markers with more or fewer bits. The more bits, the more words in the dictionary, and the smaller the chance of a confusion. However, more bits means that more resolution is required for correct detection.

Rexcirus
  • 2,459
  • 3
  • 22
  • 42