Error when importing cv2.aruco in python file

cyrillajarge
Sat, 18 Apr 2020 14:02:00 +0000
Support

Hi guys,

I’m developing a module for a school project in which I need to use OpenCV combined with Aruco.
I have installed the extension SlicerOpenCV and OpenCV is working correctly when I import cv2 in my python file.
However, it seems that there is no aruco submodule. When I do cv2.aruco.some_function, I get the error object has no attribute 'aruco'.
I’ve installed opencv-contrib-python manually using pip in the python interpreter but it doesn’t fix the problem.
cv2 version installed is 3.3.1 on 3DSlicer.

Operating system: MacOS Catalina 10.15.2
Slicer version: 4.10.2

Many thanks in advance!

3 posts - 2 participants