I'm trying to work with ArUco markers using OpenCV in python.
vidcap = cv2.VideoCapture(0)
vidcap.set(cv2.CAP_PROP_BUFFERSIZE, 1)
c = np.array(np.zeros([9,4,2]))
while vidcap.isOpened():
exists,image = vidcap.read()
if exists:
image = cv2.resize(image, (1200, 800))
arucodict = aruco.Dictionary_get(aruco.DICT_6X6_50)
arucoparams = aruco.DetectorParameters_create()
(corners, id, rejected) = aruco.detectMarkers(image, arucodict, parameters=arucoparams)
for (a,b) in zip(corners,id):
if b in range(0,10):
c[b-1]=a
The for statement is throwing an error for (a,b) in zip(corners,id): TypeError: 'NoneType' object is not iterable
What am I doing wrong?