📌  相关文章
📜  cv2.error: OpenCV(4.3.0) io opencv modules imgproc src drawing.cpp:2374: error: (-215:Assertion failed) p.checkVector(2, CV_32S) >= 0 in function 'fillPoly' - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:38.679000             🧑  作者: Mango

代码示例1
new_img = cv2.fillPoly(blank_img,[cnt],color =(255,255,255))

I was facing error in this line.

so The solution is make sure "cnt" must be int not float.

CHANGES:
cnt = np.array([[50,50], [50,150], [150,150], [150,50]],dtype=np.int32)