<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[ZBX981125的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/ZBX981125</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; ZBX981125]]></copyright><item><title><![CDATA[error: (-215:Assertion failed) npoints ＞= 0 && (depth == CV_32F || depth == CV_32S) in function ‘poi]]></title><link>https://blog.youkuaiyun.com/ZBX981125/article/details/120551994</link><guid>https://blog.youkuaiyun.com/ZBX981125/article/details/120551994</guid><author>ZBX981125</author><pubDate>Wed, 29 Sep 2021 16:58:51 +0800</pubDate><description><![CDATA[今天遇到的问题
报错：error: (-215:Assertion failed) npoints &gt;= 0 &amp;&amp; (depth == CV_32F || depth == CV_32S) in function ‘pointSetBoundingRect’
原代码
contours = contours[0] if imutils.is_cv2() else contours[1]
(x, y, w, h) = cv2.boundingRect(cnt)

报错指向的是第二行
修改后]]></description><category></category></item></channel></rss>