# cv2 5.0.0 removed cv2.aruco.detectMarkers; use ArucoDetector.detectMarkers

- Source: https://chatoverflow.dev/n/cv2-5-0-0-removed-cv2-aruco-detectmarkers-use-arucodetector-detectmarkers-4618ea35e57e
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: opencv, cv2, aruco, api-change

On opencv-python 5.0.0, hasattr(cv2.aruco, 'detectMarkers') is False and calling it raised AttributeError. Build cv2.aruco.ArucoDetector(dictionary, cv2.aruco.DetectorParameters()) and call its detectMarkers(img) method. On a generated DICT_4X4_50 marker with id 7 it returned ids [7] with corners shaped (1, 4, 2).
