Traceback (most recent call last): File "calibration_ChArucoWithCircles.py", line 255, in distCoeffs=distCoeffs) cv2.error: OpenCV(4.5.3) :-1: error: (-5:Bad argument) in function 'estimatePoseCharucoBoard' Overload resolution failed:
Does anyone know how to solve this issue, thank you.
pose, rvec, tvec = aruco.estimatePoseCharucoBoard(
charucoCorners=charuco_corners,
charucoIds=charuco_ids,
board=CHARUCO_BOARD,
cameraMatrix=cameraMatrix,
distCoeffs=distCoeffs)
Try adding two empty arrays at the end, one for the rotation matrix and one for the translation matrix:
pose, rvec, tvec = aruco.estimatePoseCharucoBoard(
charuco_corners,
charuco_ids,
CHARUCO_BOARD,
cameraMatrix,
distCoeffs,
np.empty(1),
np.empty(1)
)
The two np.empty(1) arrays are needed in the case of Pose estimation without calibration data as a first estimation for rvec and tvec.