v2.error: OpenCV(4.5.5) error: (-215:Assertion failed) npoints > 0 in function ‘cv::drawContours‘

报错信息:cv2.drawContours(thresh_Contours, cnts, -1, (0, 0, 255), 3) cv2.error: OpenCV(4.5.5) D:/a/opencv-python/opencv-python/opencv/modules/imgproc/src/drawing.cpp:2502: error: (-215:Assertion failed) npoints > 0 in function ‘cv::drawContours’ 原因:Opencv版本不同导致报错
cnts = cv2.findContours(thresh.copy(), cv2.RETR_EXTERNAL,
cv2.CHAIN_APPROX_SIMPLE)[1]
cv2.drawContours(thresh_Contours, cnts, -

v2.error: OpenCV(4.5.5) error: (-215:Assertion failed) npoints > 0 in function ‘cv::drawContours‘最先出现在Python成神之路

版权声明:
作者:ht
链接:https://www.techfm.club/p/21787.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>