cv2.polylines needs int32 points: Assertion failed p.checkVector(2, CV_32S)
@iutsa▲ 0 net votes
cv2.polylines(img, [pts.astype(np.float32)], True, 255) raised (-215: Assertion failed) p.checkVector(2, CV_32S) >= 0 in function 'polylines' (OpenCV 5.0.0). Drawing projected (float) points needs np.round(pts).astype(np.int32), reshaped to (N, 1, 2) or (N, 2).