Skip to content

added Aruco MIP dictionaries#23785

Merged
asmorkalov merged 3 commits intoopencv:4.xfrom
damianofalcioni:4.x
Jun 14, 2023
Merged

added Aruco MIP dictionaries#23785
asmorkalov merged 3 commits intoopencv:4.xfrom
damianofalcioni:4.x

Conversation

@damianofalcioni
Copy link
Copy Markdown
Contributor

added Aruco MIP dictionaries: DICT_ARUCO_MIP_16h3, DICT_ARUCO_MIP_25h7, DICT_ARUCO_MIP_36h12 from Aruco.js, converted in opencv format using https://github.com/damianofalcioni/js-aruco2/blob/master/src/dictionaries/utils/dic2opencv.js

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@asmorkalov
Copy link
Copy Markdown
Contributor

@damianofalcioni Could you add motivation to the PR. OpenCV already contains some set of dictionaries inherited from contrib. There is also add method to create custom dictionary from file. IMHO, it's bad idea to add more items to the list without strong reason.

@damianofalcioni
Copy link
Copy Markdown
Contributor Author

damianofalcioni commented Jun 12, 2023

Hi @asmorkalov,
I added such dictionaries as they are the recommended ones (especially the 36h12) from the ArUco creators
(https://www.uco.es/investiga/grupos/ava/portfolio/aruco/). As written in the manual, reachable under the Documentation section:

We propose to use the dictionary ARUCO_MIP_36h12 which we developed in a research paper....
...
As previously indicated, we recommend the ARUCO_MIP_36h12 dictionary.

In my experience this dictionary is the most commonly used, not only for its high error correction, but also because is the one used in every sample of the ArUco manual, so novices will by default use it unless they need more then 250 marker ids (very rare situation).

That's why I proposed to have it integrated directly in OpenCV.
I added the other two dictionaries just for completeness, so all the ArUco dictionaries defined here are supported, but I could also remove them and leave only the 36h12 in the pull request.

Hope this could help.

PS: in opencv.js is not possible, afaik, to use external dictionaries, so I had to use this solution anyway, but please correct me if I'm wrong

Copy link
Copy Markdown
Contributor

@AleksandrPanov AleksandrPanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I support adding only 36h12 dictionary, because this dictionary has the best hamming distance (12 vs 11 in DICT_6X6_250).

@asmorkalov asmorkalov added this to the 4.8.0 milestone Jun 14, 2023
Copy link
Copy Markdown
Contributor

@AleksandrPanov AleksandrPanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@asmorkalov asmorkalov merged commit 19f4f2e into opencv:4.x Jun 14, 2023
@asmorkalov asmorkalov mentioned this pull request Jul 12, 2023
thewoz pushed a commit to thewoz/opencv that referenced this pull request Jan 4, 2024
added Aruco MIP dictionaries opencv#23785

added Aruco MIP dictionaries: DICT_ARUCO_MIP_16h3, DICT_ARUCO_MIP_25h7, DICT_ARUCO_MIP_36h12 from [Aruco.js](https://github.com/damianofalcioni/js-aruco2), converted in opencv format using https://github.com/damianofalcioni/js-aruco2/blob/master/src/dictionaries/utils/dic2opencv.js

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [ ] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
thewoz pushed a commit to thewoz/opencv that referenced this pull request May 29, 2024
added Aruco MIP dictionaries opencv#23785

added Aruco MIP dictionaries: DICT_ARUCO_MIP_16h3, DICT_ARUCO_MIP_25h7, DICT_ARUCO_MIP_36h12 from [Aruco.js](https://github.com/damianofalcioni/js-aruco2), converted in opencv format using https://github.com/damianofalcioni/js-aruco2/blob/master/src/dictionaries/utils/dic2opencv.js

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [ ] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants