Ask Your Question

Revision history [back]

cv2.circle accepts only integers as the circle center co-ordinates. So, make sure you pass integers to the function. One way to do this is: cv2.circle(img_dst,(idx % w, idx // w) , 3, (0,0,255), -1) Or else: cv2.circle(img_dst,(idx % w, int(idx /3)) , 3, (0,0,255), -1)