Ask Your Question

Revision history [back]

you need to change (y, x) to (x, y)

r = cv2.pointPolygonTest(contours[i], (y, x), False)

to

r = cv2.pointPolygonTest(contours[i], (x, y), False)