mirror of
https://github.com/opencv/opencv.git
synced 2026-09-26 04:09:43 +03:00
objdetect(aruco): fix maxCorrectionBits in predefined dictionaries #29034 This PR fixes the bugs in the creation of some dictionaries and standarizes its construction. ## Bugs 1. **DICT_ARUCO_MIP_36h12_DATA** was incorrectly assigned `maxCorrectionBits=12`, which is the intermarker distance. This was causing a high rate of false positives during detection, which is a significant problem. 2. **APRILTAG** dictionaries were incorrectly created with `maxCorrectionBits=0`, making it impossible to do error correction. ## Solution Given a intermarker distance X, the correct `maxCorrectionBits = X/2 - 1`. Thus, standardize the construction of Dictionaries as such.