My Python script uses aruco library in opencv-contrib-python to detect ArUco code in the image. It has worked well for nearly one year, but suddenly start to pop this error in last week.
Traceback (most recent call last):
File "j:/Neil/colorimetric/patterns/detect_track_guide.py", line 586, in
dictionary = cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_4X4_100)
AttributeError: module 'cv2.cv2' has no attribute 'aruco'
ERROR conda.cli.main_run:execute(33): Subprocess for 'conda run ['python', 'j:/Neil/colorimetric/patterns/detect_track_guide.py']' command failed. (See above for error)'
I use VSCode and the opencv is up-to-date. I only install opencv-contrib-python. I tried many ways, like reinstalling or installing both opencv-contrib-python and opencv-contrib. But no one works for me.
I also have a c++ version code for my IOS APP which still works well.