0

I'm using python and pycharm on a iMac.

Line of code is:

corners, _, _ = cv2.aruco.detectMarkers(img, aruco_dict, parameters=parameters)

Error msg is:

AttributeError: module 'cv2.aruco' has no attribute 'detectMarkers'

I've looked every where and haven't found an answer...

The other "problems" is there are several instances of cv2.circle(img, (int(x), int(y)), 5, (0, 0, 255), -1), where there are these carets ^^^^^^ marks underneath the word circle in yellow, seems like where all the carets are underneath all the function names(imread,aruco,arcLength,minAreaRect,boxPoints,polylines,putText. The ^^^^^^ are like underscore _ but ^ instead)

Any answers to this?? I've tried about every YouTube videos and internet search to resolve this..but am not able to find the answer. I have no/little experience with this. By the way, I'm 75 years old, just trying something new. Thanks to all for the assistance

Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36
Rc3375
  • 41
  • 2
  • please run `pip list` (or `pip3 list`) on a terminal (not python) and present all lines that contain `opencv` – Christoph Rackwitz May 06 '23 at 10:30
  • I think all packages are install:cv 1.0.0 cv2studio 1.0.2 ffmpeg-python 0.2.0 future 0.18.3 imutils 0.5.4 numpy 1.22.3 object-detector 1.9 opencv-contrib-python 4.7.0.72 opencv-python 4.7.0.72 packaging 21.3 Pillow 9.1.0 pip 23.1.2 pyparsing 3.0.9 pytesseract 0.3.9 setuptools 65.5.0 wheel 0.40.0 This is everything installed on terminal mode. formatting in this is terrible. – Rc3375 May 06 '23 at 14:10

1 Answers1

1

Do not install multiple packages of OpenCV. They must never be installed concurrently. They will conflict with each other.

Remove all opencv-* packages. Then install exactly one.

Choose exactly one of:

  • opencv-python
  • opencv-contrib-python
  • opencv-python-headless
  • opencv-contrib-python-headless
Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36