Merge pull request #23785 from damianofalcioni:4.x

added Aruco MIP dictionaries #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
pull/23796/head
Damiano Falcioni 2 years ago committed by GitHub
parent b854d4ecd8
commit 19f4f2eb92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      modules/objdetect/include/opencv2/objdetect/aruco_dictionary.hpp
  2. 4
      modules/objdetect/src/aruco/aruco_dictionary.cpp
  3. 2
      modules/objdetect/src/aruco/predefined_dictionaries.hpp

@ -110,7 +110,8 @@ enum PredefinedDictionaryType {
DICT_APRILTAG_16h5, ///< 4x4 bits, minimum hamming distance between any two codes = 5, 30 codes
DICT_APRILTAG_25h9, ///< 5x5 bits, minimum hamming distance between any two codes = 9, 35 codes
DICT_APRILTAG_36h10, ///< 6x6 bits, minimum hamming distance between any two codes = 10, 2320 codes
DICT_APRILTAG_36h11 ///< 6x6 bits, minimum hamming distance between any two codes = 11, 587 codes
DICT_APRILTAG_36h11, ///< 6x6 bits, minimum hamming distance between any two codes = 11, 587 codes
DICT_ARUCO_MIP_36h12 ///< 6x6 bits, minimum hamming distance between any two codes = 12, 250 codes
};

@ -258,6 +258,8 @@ Dictionary getPredefinedDictionary(PredefinedDictionaryType name) {
static const Dictionary DICT_APRILTAG_36h10_DATA = Dictionary(Mat(2320, (6 * 6 + 7) / 8, CV_8UC4, (uchar*)DICT_APRILTAG_36h10_BYTES), 6, 0);
static const Dictionary DICT_APRILTAG_36h11_DATA = Dictionary(Mat(587, (6 * 6 + 7) / 8, CV_8UC4, (uchar*)DICT_APRILTAG_36h11_BYTES), 6, 0);
static const Dictionary DICT_ARUCO_MIP_36h12_DATA = Dictionary(Mat(250, (6 * 6 + 7) / 8, CV_8UC4, (uchar*)DICT_ARUCO_MIP_36h12_BYTES), 6, 12);
switch(name) {
case DICT_ARUCO_ORIGINAL:
@ -308,6 +310,8 @@ Dictionary getPredefinedDictionary(PredefinedDictionaryType name) {
case DICT_APRILTAG_36h11:
return Dictionary(DICT_APRILTAG_36h11_DATA);
case DICT_ARUCO_MIP_36h12:
return Dictionary(DICT_ARUCO_MIP_36h12_DATA);
}
return Dictionary(DICT_4X4_50_DATA);
}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save