Skip to content

Aruco related functions and objects do not work after an update from v4.5 to 4.11 #1084

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

Closed
DigitalGabriele opened this issue Feb 20, 2025 · 0 comments

Comments

@DigitalGabriele
Copy link

Hello,

I have the following lines of code that I used in opencv v4.5 that I rewrote to use opencv 4.11:

cv2.aruco_dict = cv2.aruco.Dictionary_get(aruco_dict_type)

changed to

aruco_dict = cv2.aruco.getPredefinedDictionary(aruco_dict_type)

parameters = cv2.aruco.DetectorParameters_create()

changed to

parameters = cv2.aruco.DetectorParameters()

aruco_board = cv2.aruco.Board_create(pos_board, cv2.aruco_dict, id_board)

changed to

aruco_board = cv2.aruco.Board(pos_board, aruco_dict, id_board)

corners, ids, rejected_img_points = cv2.aruco.detectMarkers(gray, cv2.aruco_dict,parameters=parameters, cameraMatrix=matrix_coefficients, distCoeff=distortion_coefficients)

changed to

aruco_detector = cv2.aruco.ArucoDetector(aruco_dict, parameters)
corners, ids, rejected_img_points = aruco_detector.detectMarkers(gray)

marker_detected, rvec_board, tvec_board = cv2.aruco.estimatePoseBoard(corners, ids, aruco_board, matrix_coefficients, distortion_coefficients, rvec_initial_guess, tvec_initial_guess)

I have no idea what to do with this one.

cv2.aruco.drawDetectedMarkers(frame, corners)
Not changed.

cv2.aruco.drawAxis(frame, matrix_coefficients, distortion_coefficients, rvec_board, tvec_board, length=0.25)
Not changed.

I would appreciate your guidance on two things:

  1. If my key changes are correct.
  2. How to change the cv2.aruco.estimatePoseBoard() to the new version? Is there an equivalent?
@DigitalGabriele DigitalGabriele closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant