Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanding the predefined dictionaries #2704

Closed
EceChaik opened this issue Oct 9, 2020 · 5 comments
Closed

Expanding the predefined dictionaries #2704

EceChaik opened this issue Oct 9, 2020 · 5 comments

Comments

@EceChaik
Copy link

EceChaik commented Oct 9, 2020

Hi everybody,

I was wondering if the MIP_36h12 dictionary can be added to opencv_contrib/aruco

@bign8
Copy link

bign8 commented Aug 30, 2021

Is this still wanted or in the works?

Looks like the ArUco authors highly recommend the use of the use of the MIP_36h12 library.

We ... recommend using ARUCO_MIP_36h12 because it is more robust to errors.
Source

After some poking around over there, I found the dictionary in src/dictionary.cpp#L159.

If this is still wanted or open to be contributed, the data has to be converted into a format that the predefined dictionaries expect:

Dictionaries are stored as a list of bytes in its four rotations
On each rotation, the marker is divided in bytes assuming a row-major order
This format allows a faster marker identification.
For a dictionary composed by M markers of NxN bits, the structure dimensions should be:
const char name[nMarkers][4rotations][nBytes], or more specifically:
const char name[M][4][ceil(NxN/8)]
The element [i][j][k] represents the k-th byte of the i-th marker in the dictionary
in its j-th rotation.
Each rotation implies a 90 degree rotation of the marker in anticlockwise direction.
Source: modules/aruco/src/predefined_dictionaries.cpp

Any details around why this issue was closed? Is there a simple fix that I'm not seeing?

Thanks,

  • an OpenCV (and ArUco) newbie

@asmorkalov
Copy link
Contributor

related: #3200

@Em607867
Copy link

Is this still wanted or in the works?

Looks like the ArUco authors highly recommend the use of the use of the MIP_36h12 library.

We ... recommend using ARUCO_MIP_36h12 because it is more robust to errors.
Source

After some poking around over there, I found the dictionary in src/dictionary.cpp#L159.

If this is still wanted or open to be contributed, the data has to be converted into a format that the predefined dictionaries expect:

Dictionaries are stored as a list of bytes in its four rotations
On each rotation, the marker is divided in bytes assuming a row-major order
This format allows a faster marker identification.
For a dictionary composed by M markers of NxN bits, the structure dimensions should be:
const char name[nMarkers][4rotations][nBytes], or more specifically:
const char name[M][4][ceil(NxN/8)]
The element [i][j][k] represents the k-th byte of the i-th marker in the dictionary
in its j-th rotation.
Each rotation implies a 90 degree rotation of the marker in anticlockwise direction.
Source: modules/aruco/src/predefined_dictionaries.cpp

Any details around why this issue was closed? Is there a simple fix that I'm not seeing?

Thanks,

  • an OpenCV (and ArUco) newbie

Hi,

Were you able to resolve this issue? I am trying to detect markers in the same dictionary

@asmorkalov
Copy link
Contributor

Python bindings for dicts: #3229

@AleksandrPanov
Copy link
Contributor

Add dictionary bindings #3229 was merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants