Please don’t edit with C++ code. This is Python, you are doing a disservice.
img = cv2.imread("test.jpg")
corners, ids, rejectedImgPoints = aruco.detectMarkers(img, aruco.DICT_4X4_1000)
Output every time:
Traceback (most recent call last):
File "test.py", line 2, in <module>
corners, ids, rejectedImgPoints = aruco.detectMarkers(img, aruco.DICT_4X4_1000)
cv2.error: OpenCV(4.5.2) :-1: error: (-5:Bad argument) in function 'detectMarkers'
> Overload resolution failed:
> - Expected Ptr<cv::aruco::Dictionary> for argument 'dictionary'
> - Expected Ptr<cv::aruco::Dictionary> for argument 'dictionary'
No idea what the error means and can’t find any info online.