I am trying to visualize bounding boxes on top of an image.
My Code:
color = (255, 255, 0)
thickness = 4
x_min, y_min, x_max, y_max = bbox
cv2.rectangle(img, (x_min, y_min), (x_max, y_max), color, thickness=thickness)
and I get
TypeError: Argument given by name ('thickness') and position (4)
Even if I pass thickness positionally, I get a different traceback:
cv2.rectangle(img, (x_min, y_min), (x_max, y_max), color, thickness)
raises TypeError: expected a tuple.
print(type(thickness)
andprint(thickness)
so we can trace what's going on? – Simile