Ask Your Question

Revision history [back]

Collision with color tracking

I've got color tracking working with my camera. Now I want to know how to know if there was a collision between object I draw on screen(circle for example) and some shape, that i'm tracking with camera. I have a mask:

mask = cv2.inRange(hsv, player1.lower_color, player1.upper_color)

And some circle:

img = cv2.circle(img,(447,63), 63, (0,0,255), -1)

I'm using cv2 for python(I've found some solutions for cv, but I need it in cv2, and that looks completly different) Can you help me?