-
-
Notifications
You must be signed in to change notification settings - Fork 56.3k
Closed
Milestone
Description
System Information
OpenCV version: 4.7.0
Detailed description
ChArUco patterns have been moved recently from OpenCV contrib to the main branch in OpenCV 4.7.0, but such patterns have been used for a longer time across the world. Backwards compatiblity with pre-existing targets and data needs to be ensured to avoid waste of resources and material.
OpenCV (contrib) 4.6.0 introduced a backwards incompatible change in ChArUco pattern generation for even row count. The impact is quite big.
- Existing calibration targets that have been self-manufactured or procured expensively are incompatible with the latest OpenCV versions.
- On stock targets from e.g. https://calib.io/ do not work with OpenCV anymore.
- Acquired calibration data images cannot be processed anymore.
Related issues in OpenCV contrib:
- CharucoBoard_create regression / incompatible patterns (only even row count) with 4.6.0 opencv_contrib#3291
- Function interpolateCornersCharuco misplace corners opencv_contrib#3301
A fix is available that enables support for pre and post 4.6.0 patterns.
Steps to reproduce
import cv2
aruco_dict = cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_5X5_1000)
charuco_board = cv2.aruco.CharucoBoard_create(
squaresX = 5,
squaresY = 4,
squareLength = 4,
markerLength = 3,
dictionary = aruco_dict
)
img_board = charuco_board.draw((250,200), marginSize=0, borderBits=1)
cv2.imwrite('charuco_OpenCV-' + cv2.__version__ + '.png', img_board)
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)
ajaypbrt and AleksandrPanovcrackwitzcrackwitz and qq3045153794MPJansen and rlav440