ArUCo-Markers-Pose-Estimation-Generation-Python icon indicating copy to clipboard operation
ArUCo-Markers-Pose-Estimation-Generation-Python copied to clipboard

version problems

Open zvictorliu opened this issue 2 years ago • 2 comments

Hello! May I ask what's your Python and Opencv version? Your code seems incompatible to the newest.

zvictorliu avatar Jul 25 '23 03:07 zvictorliu

Hello! May I ask what's your Python and Opencv version? Your code seems incompatible to the newest.

I have the same problem. It's incompatible with the newest version of Opencv 4.8 and Opencv 4.6

furkanatak avatar Aug 09 '23 07:08 furkanatak

Hello! It seems there are problems with naming for versions of OpenCV higher than 4.6. I made some changes in the code and now it's working the changes are the following:

# arucoDict = cv2.aruco.Dictionary_get(ARUCO_DICT[args["type"]]) is replaced by:
arucoDict = cv2.aruco.getPredefinedDictionary(ARUCO_DICT[args["type"]])

# arucoParams = cv2.aruco.DetectorParameters_create() is replaced by:
arucoParams = cv2.aruco.DetectorParameters()

# detector instanciation
detector = cv2.aruco.ArucoDetector(arucoDict, arucoParams) 

# corners, ids, rejected = cv2.aruco.detectMarkers(frame, arucoDict, arucoParams) is replaced by:
corners, ids, rejected = detector.detectMarkers(frame)

aminebouabid95 avatar Oct 27 '23 09:10 aminebouabid95