opencv error: (-215:Assertion failed) npoints > 0 in function 'drawContours'
binary,contours = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE)
draw_img = img.copy()
res = cv2.drawContours(draw_img, binary, -1, (0, 0, 255), 2)
drawContours第二个参数改成binary即可
...
原创
2019-11-16 13:50:36 ·
6628 阅读 ·
7 评论