I’ve started a uni project that requires the use of ArUco markers, however I cannot get the code to work or any ArUco code for that matter.
I have gone through every ‘solution’ I can come across but no good.
I have installed the correct modules and the pip cv contrib installs that should allow it to work but i’m always getting the same error…
import cv2 as cv
from cv2 import aruco
# dictionary to specify type of the marker
marker_dict = aruco.Dictionary_get(aruco.DICT_6X6_250)
# MARKER_ID = 0
MARKER_SIZE = 400 # pixels
# generating unique IDs using for loop
for id in range(20): # genereting 20 markers
# using funtion to draw a marker
marker_image = aruco.generateImageMarker(marker_dict, id, MARKER_SIZE)
After running a ArUco generator or detection code I get this error.
id = 24 # This is the identifier of the bookmark, you can change it to whatever you need
img_size = 700 # Define the size of the final image
marker_img = cv2.aruco.generateImageMarker(aruco_dict, id, img_size)